Repository navigation
[WSL] Breakpoints fail to bind when attaching to JVM in WSL2 after Debugger for Java 0.58.3 update; rollback fixes #611
Description
Activity
Hi Clerton Sampaio (@clertonbruno), I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.
Suggestions:
• Use source mapping so the debugger can bind breakpoints to files under WSL2. In your launch.json
attachconfiguration add something like:{ "type": "java", "request": "attach", "hostName": "127.0.0.1", "port": 5005, "sourcePaths": [ { "remoteRoot": "/home/your-user/your-project", "localRoot": "${workspaceFolder}" } ], "trace": "verbose" }– See Remote debug docs: https://code.visualstudio.com/docs/java/java-debugging#_configure-the-remote-debug-settings
• Enable verbose logging to capture why breakpoints don’t bind:
– Add"trace": "verbose"and inspect the DEBUG CONSOLE for messages about class loading and breakpoint mapping.• As a temporary workaround, rollback to Debugger for Java 0.58.2 & Language Support for Java 1.46.0.
• If this persists, please file an issue including the verbose logs.
High-confidence references:
• Breakpoints not working after recent update (similar symptom of ignored breakpoints) — microsoft/vscode-java-debug#1364
Other references with low confidence
• Breakpoints not working at all in 0.58.x series — microsoft/vscode-java-debug#1531
• Spring/WSL2 debug lands in platform classes, not user code — microsoft/vscode-java-debug#795The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!
Clerton Sampaio (@clertonbruno) Thanks for the report. The symptom suggests the breakpoint may actually be hit and the debuggee thread is suspended, but the client
fails to resolve/show the source for the stopped stack frame.Could you help collect a bit more information?
-
Please try this version matrix:
- Debugger for Java 0.58.3 + Language Support for Java 1.46.0
- Debugger for Java 0.58.2 + Language Support for Java 1.47.0
- latest Debugger for Java + latest Language Support for Java
-
Please share your full
launch.jsonattach configuration, especiallyhostName,port,projectName, andsourcePaths. -
Please share the relevant paths:
- Windows workspace path
- WSL project path
- the command/current directory used to start the JVM
- the source file path and package/class name where the breakpoint is set
-
Please enable
"trace": "verbose"and attach the Java Debug logs from session start until the request hangs. The most useful
parts aresetBreakpoints,stopped, andstackTraceresponses, especially thesource.pathvalues. -
When the request hangs, does the Call Stack view show a stopped thread, Unknown Source, or nothing at all?
This will help us determine whether the regression is in the debug adapter or in JDT-LS/Eclipse source lookup/path mapping under WSL.
-
Environment:
Expected:
Attaching from Windows (Cursor/VS Code) to a JDWP-enabled JVM in WSL2 stops at breakpoints in my project code.
Actual:
After updating to Debugger for Java 0.58.3 and Language Support for Java 1.47.0, attach no longer stops at breakpoints. HTTP requests hang as if the breakpoint is hit, but the IDE never jumps to the code. Attaching using
jdband setting the same breakpoints works fine, so JDWP and class debug info are good.Rolling both extensions back (Debugger for Java 0.58.2 and Language Support for Java 1.46.0) restores proper behaviour.
Repro steps:
jdbattach shows that the breakpoint is hit.Notes:
address=*:5005can't be used with Java 8 due togethostbynameerrors.Thanks for looking into this.