Create a Debug Configuration like below and press F5 to debug :
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Attach)",
"projectName": "Your_Project_Name",
"request": "attach",
"hostName": "your_host_name",
"port": Debugging_port
}
]
Example :
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Attach)",
"projectName": "MyApplication",
"request": "attach",
"hostName": "localhost",
"port": 8787
}
]
I am using wildfly server. So the default debugging port is 8787.