vscode-java-debug
vscode-java-debug copied to clipboard
VSCode java Debugger (v0.52.0) ignores break points and instead breaking in platform classes for now reason
[provide a description of the issue]
Environment
-
Operating System: Mac
-
JDK version: 8
-
Visual Studio Code version:
-
Version: 1.79.0 Commit: b380da4ef1ee00e224a15c1d4d9793e27c2b6302 Date: 2023-06-07T14:29:00.206Z (1 mo ago) Electron: 22.5.5 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Darwin x64 19.6.0
-
Java extension version:v0.25.2023062906
-
Java Debugger extension version:v0.52.0
Steps To Reproduce
- Uninstalled and reinstalled both Java Ext Pack and Java Debugger
- Attached debugger to java process
- Set breakpoint in my method
- Made process to execute method in question
- It is not breaking in my method
- Instead it is breaking in the platform Executor class where no breakpoints are defined
[attach a sample project reproducing the error] attach logs
Current Result
Breaks in platform class always
Expected Result
Breaks in my code open in VSCode
Additional Informations
Every-thing was working as expected until recent updates to the Java debugger.
Instead it is breaking in the platform Executor class where no breakpoints are defined
This seems to be a problem with the source mapping rather than the breakpoint. The breakpoint stops at the correct position, but some of the stack frames show “Unknown Source” in the CALL STACK view. As a result, the cursor skips to the first frame that has a valid source mapping.
@testforstephen , I have a sample project where someone is getting "Unknown Source" for source & library code and it ultimately sets the cursor in something like Thread.run(), but no one else is getting the issue. Are there any behaviours that would cause this ? I also noticed the first time the project is being debugged, there's a download job to fetch the sources, so maybe if that fails, it might cause this ?
Update: Apparently it's happening in a remove scenario but works correctly locally.
The debugger searches the source container associated with the project to locate the source file corresponding to the specified frame location. If no match is found, it returns the label ‘Unknown Source’.
https://github.com/microsoft/java-debug/blob/83403a458e0d01fba5a3871fea81af742460bdf0/com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/JdtSourceLookUpProvider.java#L393