Skip to content

[WSL] Breakpoints fail to bind when attaching to JVM in WSL2 after Debugger for Java 0.58.3 update; rollback fixes #611

Description

Environment:

  • Host OS: Windows 11, IDE: Cursor/VS Code
  • Guest: WSL2 Ubuntu 22.04
  • Java: OpenJDK 1.8.0_432 (Java 8)
  • Extensions: Debugger for Java 0.58.3 (latest), Language Support for Java 1.47.0
  • Spring Boot app running inside WSL2, debugged via JDWP attach on port 5005.

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 jdb and 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:

  1. Build and run the Spring Boot jar in WSL2 with JDWP:
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 \
  -Dspring.profiles.active=local -Duser.timezone=UTC \
  -jar build/libs/your-app.jar
  1. In Windows Cursor/VS Code, attach to 127.0.0.1:5005 (port forwarded via Remote - WSL).
  2. Set a breakpoint in any controller method.
  3. Send an HTTP request hitting that controller.
  4. Observe: request hangs but IDE never shows breakpoint. Meanwhile, jdb attach shows that the breakpoint is hit.

Notes:

  • This only occurs when the JVM runs in WSL2 and the IDE is on Windows. A colleague running everything natively on Windows (no WSL) doesn't see the problem.
  • address=*:5005 can't be used with Java 8 due to gethostbyname errors.
  • This seems like a regression introduced in 0.58.3 (or 0.58.3 + language server update). Rolling back fixes the issue.

Thanks for looking into this.

Activity

  1. github-actions commented on Nov 14, 2025

    @github-actions

    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 attach configuration 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#795

    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!

  2. wenytang-ms commented on Apr 28, 2026

    @wenytang-ms
    Contributor

    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?

    1. 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
    2. Please share your full launch.json attach configuration, especially hostName, port, projectName, and sourcePaths.

    3. 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
    4. Please enable "trace": "verbose" and attach the Java Debug logs from session start until the request hangs. The most useful
      parts are setBreakpoints, stopped, and stackTrace responses, especially the source.path values.

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

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions