Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCode java Debugger (v0.52.0) ignores break points and instead breaking in platform classes for now reason #1364

Open
mchern opened this issue Jul 12, 2023 · 3 comments
Assignees

Comments

@mchern
Copy link

mchern commented Jul 12, 2023

[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
  1. Uninstalled and reinstalled both Java Ext Pack and Java Debugger
  2. Attached debugger to java process
  3. Set breakpoint in my method
  4. Made process to execute method in question
  5. It is not breaking in my method
  6. Instead it is breaking in the platform Executor class where no breakpoints are defined
image

[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.

@testforstephen
Copy link
Contributor

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.

@rgrunber
Copy link

rgrunber commented May 21, 2024

@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.

@testforstephen
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants