microsoft / microsoft/vscode-java-debug

Breakpoints don’t bind when attaching to JVM in WSL2 from Windows (Cursor/VS Code) — requests hang, `jdb` hits fine

オープン
#1,582 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

ai-triaged
主要言語
TypeScript
スター
591
フォーク
429
平均マージ
1日 9時間
マージ済み PR(30日)
19

説明

Environment

  • Host OS: Windows 11
  • IDE: Cursor/VS Code on Windows with repo mounted via WSL2
  • Guest OS: WSL2 Ubuntu 22.04
  • Java: OpenJDK 1.8.0_432 (Java 8)
  • Extensions:
    • Debugger for Java: latest version
    • Language Support for Java™ by Red Hat: 1.47.0
  • Project: Spring Boot API (Gradle)

Expected behavior
Attach to 127.0.0.1:5005 and stop at breakpoints in controllers; HTTP requests hang until continued.

Actual behavior
Attach connects but IDE never stops at breakpoints; HTTP requests hang. Attaching with jdb hits breakpoints fine, so JDWP works. Rolling back both extensions fixes it.

Steps to reproduce

  1. Build: ./gradlew clean assemble -x test
  2. Run jar with JDWP:
    java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 \
         -Dspring.profiles.active=local -Duser.timezone=UTC \
         -jar build/libs/*.jar
    
  3. In Windows Cursor/VS Code, attach to host 127.0.0.1 port 5005.
  4. Set breakpoint in a @RestController method.
  5. Call the endpoint.

More info

  • javap -v shows SourceFile and LineNumberTable.
  • Verified JDWP by attaching via jdb -attach 127.0.0.1:5005; breakpoints hit.
  • Rolling back Debugger for Java (e.g., to 0.58.2) and Language Support for Java (e.g., to 1.46.0) resolves the problem.

Workaround
Roll back both Java extensions or use jdb.

Notes
Seems specific to Windows host + WSL2 remote debug mapping; not reproducible with native Windows debug.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Windows 11、WSL2 Ubuntu、Java 8、および記載された拡張機能のバージョンを使用し、提供された Gradle コマンドと JDWP コマンドで attach シナリオを再現します。jdb -attach 127.0.0.1:5005 および記載された拡張機能のロールバック時の IDE の動作と比較します;完了条件は、コントローラーのブレークポイントがバインドされ、HTTP リクエストが正しく再開されることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java, typescript, vscode
領域
devtools
issue の種類
バグ
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。