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

Closed as not planned

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.

  3. wenytang-ms commented on Oct 29, 2026

    @wenytang-ms
    Contributor

    I tried to reproduce this using a minimal Spring Boot application, but could not reproduce the reported behavior.

    Test environment:

    • Windows VS Code 1.144.0 with a local Windows workspace, attaching to a JVM in WSL2 Ubuntu 22.04.
    • OpenJDK / Temurin 8u432 and Spring Boot 2.7.18.
    • JDWP attach through 127.0.0.1.
    Debugger for Java Language Support for Java Result
    0.58.3 1.47.0 Passed
    0.58.2 1.47.0 Passed
    0.58.3 1.46.0 Passed
    0.58.2 1.46.0 Passed
    0.60.0 1.58.0 Passed

    For both a regular controller call and a call containing lambda frames, breakpoints bound and were hit, VS Code navigated to the correct source file and line, and stackTrace requests completed successfully. After continuing execution, the HTTP requests returned 200. These results only cover this minimal setup; they do not establish that the originally reported problem has been fixed.

    Closing this for now because I could not reproduce it with the available information. If you can reproduce it again, please provide enough details or logs for us to investigate, ideally:

    1. A minimal reproducible project and the exact steps/request that trigger the problem.
    2. The exact VS Code/Cursor, extension, and Java versions, and whether the workspace is opened locally on Windows or through Remote - WSL.
    3. The full attach configuration from launch.json, the Windows/WSL workspace and source paths, and the JVM startup command and working directory.
    4. Java debugger and language server logs from session startup through the failure, particularly setBreakpoints, stopped, and stackTrace messages and their source.path values. To enable verbose debugger logging, set "java.debug.logLevel": "verbose" in settings.json. Please redact any sensitive information before sharing logs.

    We can reopen this issue and investigate further once sufficient reproduction information or diagnostic logs are available.

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