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
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 591
- Fork
- 429
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 19
Mô tả
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
- Build:
./gradlew clean assemble -x test - 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 - In Windows Cursor/VS Code, attach to host 127.0.0.1 port 5005.
- Set breakpoint in a @RestController method.
- Call the endpoint.
More info
javap -vshowsSourceFileandLineNumberTable.- 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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tái hiện kịch bản attach với Windows 11, WSL2 Ubuntu, Java 8 và các phiên bản extension được liệt kê bằng các lệnh Gradle và JDWP được cung cấp. So sánh hành vi của IDE với jdb -attach 127.0.0.1:5005 và các bản rollback extension đã nêu; hoàn tất khi các breakpoint của controller được liên kết và các request HTTP tiếp tục đúng cách.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java, typescript, vscode
- Lĩnh vực
- devtools
- Loại issue
- Lỗi
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100