Vscode-java-debug: Not hit breakpoint using mvnDebug spring-boot:run

Created on 17 May 2018  路  2Comments  路  Source: microsoft/vscode-java-debug

Environment
Steps To Reproduce
  1. [step 1]input mvnDebug clean spring-boot:run

cmd shows:

Preparing to Execute Maven in Debug Mode
Listening for transport dt_socket at address: 8000

  1. [step 2] add a breakpoint to somewhere in a controller.

  2. [step 3] F5,using this configration

{
            "type": "java",
            "name": "Debug (Attach)",
            "request": "attach",
            "hostName": "localhost",
            "port": 8000
}
  1. [step 4] access the controller in browser http://localhost:8080/fooControler/getList
Current Result

skip the breakpoint

Expected Result

pause on breakpoint

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.

All 2 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

llgcode picture llgcode  路  7Comments

mojo2012 picture mojo2012  路  3Comments

mojo2012 picture mojo2012  路  5Comments

Urastor picture Urastor  路  4Comments

AlexMAS picture AlexMAS  路  5Comments