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

Aperta
#1,582 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

ai-triaged
Lingua principale
TypeScript
Stelle
591
Fork
429
Merge medio
1g 9h
PR unite (30g)
19

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riproduci lo scenario di attach con Windows 11, WSL2 Ubuntu, Java 8 e le versioni delle estensioni elencate usando i comandi Gradle e JDWP forniti. Confronta il comportamento dell’IDE con jdb -attach 127.0.0.1:5005 e con i rollback indicati delle estensioni; il lavoro è completato quando i breakpoint dei controller vengono associati e le richieste HTTP riprendono correttamente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java, typescript, vscode
Ambito
devtools
Tipo di issue
Bug
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.