mvnDebug clean spring-boot:runcmd shows:
Preparing to Execute Maven in Debug Mode
Listening for transport dt_socket at address: 8000
[step 2] add a breakpoint to somewhere in a controller.
[step 3] F5,using this configration
{
"type": "java",
"name": "Debug (Attach)",
"request": "attach",
"hostName": "localhost",
"port": 8000
}
http://localhost:8080/fooControler/getListskip the breakpoint
pause on breakpoint
Sorry,it's not vscode-java-debug issue.The right comand should be
mvn spring-boot:run -Dspring-boot.run.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
@qslcna if you are running at java 8+, it should be -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000, your command line args seems outdated.
Most helpful comment
@qslcna if you are running at java 8+, it should be
-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000, your command line args seems outdated.