[WSL] Breakpoints fail to bind when attaching to JVM in WSL2 after Debugger for Java 0.58.3 update; rollback fixes
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 冷清
- 技術堆疊
- java, spring-boot, vscode
- 領域
- devtools
研究方向
首先使用提供的 JDWP 命令、Windows VS Code 或 Cursor,以及 controller 中的中斷點重現 WSL2 情境,然後比較 Debugger for Java 0.58.3 與 0.58.2。使用現有 repository 入口調查 java-debug 的 attach 與中斷點行為。完成的標準是中斷點在 WSL2 中能正確繼續執行,同時原生 Windows 行為不受影響。
由索引模型根據 Issue 內容生成。
描述
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:
- 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
- In Windows Cursor/VS Code, attach to 127.0.0.1:5005 (port forwarded via Remote - WSL).
- Set a breakpoint in any controller method.
- Send an HTTP request hitting that controller.
- Observe: request hangs but IDE never shows breakpoint. Meanwhile,
jdbattach 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=*:5005can't be used with Java 8 due togethostbynameerrors.- 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.
- 主要語言
- Java
- 星號
- 409
- 分支
- 204
- 平均合併
- 1 天 13 小時
- 30 天內合併 PR
- 4
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoft/java-debug 的其他 Issue
-
ai-triaged enhancement
難度 4/5 3-5 天 新手友好度 35/100
microsoft/java-debug#608 · 3 則留言 ·
-
ai-triaged question
難度 5/5 一週以上 新手友好度 30/100
microsoft/java-debug#597 · 1 則留言 ·
-
ai-triaged bug
難度 4/5 3-5 天 新手友好度 25/100
microsoft/java-debug#588 · 1 則留言 ·
-
ai-triaged question
難度 2/5 1-3 小時 新手友好度 35/100
microsoft/java-debug#582 · 1 則留言 ·
-
ai-triaged enhancement
難度 5/5 一週以上 新手友好度 25/100
microsoft/java-debug#580 · 2 則留言 ·
查看 microsoft/java-debug 的全部 Issue
相似的 Issue
-
Bug Java Platform: Java
難度 2/5 1-3 小時 新手友好度 78/100
getsentry/sentry-java#6138 · 1 則留言 ·
-
bug needs triage p2
難度 2/5 1-3 小時 新手友好度 78/100
GoogleCloudPlatform/DataflowTemplates#4273 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 78/100
-
難度 2/5 1-3 小時 新手友好度 76/100
-
bug needs triage
難度 2/5 1-3 小時 新手友好度 76/100