javaVSCode icon indicating copy to clipboard operation
javaVSCode copied to clipboard

JBoss EAP Standalone Remote Debugging

Open jsperafico opened this issue 8 years ago • 1 comments

Hi everyone,

I'm trying to debug some custom application deployed in JBoss EAP. My setup for it is like so:

  • standalone.conf enabled the following property: JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"
  • started jboss standalone on Terminal: ./standalone.sh --debug
  • Visual Studio Code's task.json has nothing special and works fine: { "version": "0.1.0", "command": "mvn", "isShellCommand": true, "showOutput": "always", "suppressTaskName": true, "tasks": [ { "taskName": "clean package", "args": [ "-Plocal-deploy", "clean", "package", "wildfly:deploy" ], "isBuildCommand": true } ] }
  • Visual Studio Code's launch.json I've tried this: { "name": "Debug JBoss", "type": "java", "request": "launch", "stopOnEntry": true, "cwd": "${fileDirname}", "startupClass": "${fileBasename}", //"jdkPath": "${env:JAVA_HOME}/bin", "jdkPath": "/usr/local/java/jdk1.8.0_102/bin", "options": [ "-classpath", "\"${fileDirname};.\"" ], "externalConsole": true, "debugServer": 8787 }

With remote server started in debug mode, the console shows this when I try to connect to it: Debugger failed to attach: handshake failed - received >Content-Length< - expected >JDWP-Handshake<

Does anyone has the same problem? Thank you for the help by the way.

jsperafico avatar May 02 '17 14:05 jsperafico

There might be a mistake with "debugServer": 8787, I think it should be "remotePort": 5005 instead.

bruce965 avatar Jul 01 '17 19:07 bruce965