Skip to content

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

Closed as not planned

Description

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

Activity

  1. testforstephen commented on Jul 14, 2023

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

  2. rgrunber commented on May 21, 2024

    @rgrunber

    Jinbo Wang (@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.

  3. testforstephen commented on May 22, 2024

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

  4. github-actions commented on Nov 10, 2025

    @github-actions

    Hi Max Chernyshov (@mchern), 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.

    The debugger is currently known to skip breakpoints outside the main debugged class when attaching to a JVM without explicit source mappings. Suggestions:

    • Ensure your classes are compiled with debug symbols (javac –g).
    • Add sourcePaths in your attach config so VS Code can map sources, e.g.:

    {
      "type": "java",
      "name": "Attach to Remote",
      "request": "attach",
      "hostName": "localhost",
      "port": 5005,
      "sourcePaths": ["${workspaceFolder}/src/main/java"]
    }

    High-confidence references:
    • #1319: Debugger skips breakpoints not in the main class tracked #1319
    • #1116: Breakpoints ignored in other classes (Maven modules) #1116

    Other references with low confidence • (none additional)

    The 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!

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions