Closed eric2877 closed 7 years ago
classpath
option was added recently, it isn't published on marketplace yet. see: https://github.com/DonJayamanne/javaVSCode/commit/ee0fcb3ce1e9cbf69e81c8e8e4d3290b66107a7a
Instead, You can clone this repo in your extensions folder and do npm install
inside it.
@DonJayamanne will publish it in his free time.
thanks for your reply,i did npm install (in addition, the package.json file lost a "," in line 183), and compiled all ts files to js in my extensions folder, when i debug java, nothing happended, except a bar at the top of the window with only stop button available.
if i use the attribuilt "externalConsole": true, see the message below in cmd Listening for transport dt_socket at address: 54497 Debugger failed to attach: handshake failed - connection prematurally closed
launch.json "version": "0.2.0", "configurations": [
{
"name": "Java",
"type": "java",
"request": "launch",
"stopOnEntry": true,
"jdkPath": "${env:JAVA_HOME}/bin",
"cwd": "${workspaceRoot}",
"startupClass": "HelloWorld",
"classpath": [
".",
"${workspaceRoot}/bin"
],
"externalConsole": true
},
I really don't know what's wrong with it, my nodejs version is v8.1.3, window 10 1607 X64,
Then, I click the stop button, after than, the command line output the "helloworld", it's so weird.
Listening for transport dt_socket at address: 56950 Debugger failed to attach: handshake failed - connection prematurally closed ERROR: transport error 202: recv error: Connection reset by peer Listening for transport dt_socket at address: 56950 helloworld
I can see that message too, I think is a bug :sweat_smile:
all right, I believe the next release will be much better, Thanks for your patience
See #8
My system is win10 x64 when I am tring to debug helloworld.java, it always failed at the beginning, cmd : Listening for transport dt_socket at address: 52414 Debugger failed to attach: handshake failed - connection prematurally closed so I start the server manully in cmd as you suggested in an answer.
PS D:\Document\VScode\Java\src\com\liu\little> java -agentlib:jdwp=transport=dt_socket,server=y,address=4711 Helloworld Listening for transport dt_socket at address: 4711 Debugger failed to attach: handshake failed - received >Content-Length< - expected >JDWP-Handshake< Debugger failed to attach: handshake failed - received >Content-Length< - expected >JDWP-Handshake< Debugger failed to attach: handshake failed - received >Content-Length< - expected >JDWP-Handshake<
launch.json "version": "0.2.0",
]
tasks.json "version": "0.1.0",