Remote debugging is only removed using the vs code, so there will be a simple command mvnDebug spring-boot:runthat will do the same thing as mvn spring-boot:run, but adds the following parameters:
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y
Then you can attach the vs code, the launch.json sample looks like this:
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Launch)",
"request": "launch",
"mainClass": "",
"args": ""
},
{
"type": "java",
"name": "Debug (Attach)",
"request": "attach",
"hostName": "localhost",
"port": 8000
}
]
}
and you can select Debug(Attach)in the debug panel to run.
source
share