VS Code Debugger Freezes When Using wrap_wsgi_app with debugpy
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 38/100
Hướng nghiên cứu
Bắt đầu với main.py của dự án mẫu, đặc biệt là các dòng 5, 6 và 8, rồi khởi chạy cấu hình debug “wsgiref” đi kèm bằng Python 3.13. Tái hiện hiện tượng đóng băng tại breakpoint bằng curl, sau đó theo dõi tương tác giữa wrap_wsgi_app(app) và debugpy. Được xem là hoàn tất khi các breakpoint tập trung vào dòng mã nguồn, các điều khiển của trình gỡ lỗi phản hồi và yêu cầu HTTP hoàn tất sau khi tiếp tục chạy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Environment data
- debugpy version: XXX (run
import debugpy; print(debugpy.__version__)if uncertain)1.8.13 - OS and version:
- Python version (& distribution if applicable, e.g. Anaconda):
Virtualenv
Python: 3.13.4
Implementation: CPython
Platform: linux
OS: posix
Python: 3.13.4
Path: /home/tony/.pyenv/versions/3.13.4
Executable: /home/tony/.pyenv/versions/3.13.4/bin/python3.13
- Using VS Code
Actual behavior
- VS Code debugger gets stuck once breakpoint is hit.
- UI does not switch to source code line.
- Debugger controls (Resume, Step Out, etc.) are unresponsive.
- HTTP server hangs (no response).
- However, the VS Code CALL STACK shows status: "PAUSED".
Expected behavior
- Debugger pauses on the specified line and focuses editor on source code.
- Debugger controls should remain fully functional.
- Upon resuming, the HTTP server should respond correctly:
HTTP/1.0 200 OK
Content-Length: 13
Content-Type: text/plain
Date: Wed, 11 Jun 2025 20:54:32 GMT
Server: WSGIServer/0.2 CPython/3.13.4
Hello world!
Steps to reproduce:
- Clone the sample project: https://github.com/totobest/python-debug-test
- Setup Python interpreter and install venv (poetry configuration is included)
- Launch the included "wsgiref" debug configuration..
- Set a breakpoint on line 5 or 6 of main.py..
- In a terminal, run:
curl -i localhost:8000
Additional Context
- Issue occurs consistently across Python versions 3.9 to 3.13.
- Tested across multiple Python Debugger extension versions (2024.x to latest).
- Works as expected when no breakpoint is set.
- Removing the call to
wrap_wsgi_app(app)(line 8) resolves the issue entirely.
- Ngôn ngữ chính
- Python
- Star
- 2.5k
- Fork
- 202
- Merge trung bình
- 5 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 1
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.
Issue khác của microsoft/debugpy
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Document "rules"-option Đang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Adapter bootstrap fails with ConnectionRefusedError on WSL2 VirtioProxy or hostAddressLoopback Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
Tất cả issue của microsoft/debugpy
Issue tương tự
-
essnmx good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
-
[Feature] 奇物选择添加优先级 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
syfoud/Simulated_Scepter#174 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Giskard-AI/giskard-oss#2840 · 1 bình luận ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Đang mởarea: repo bug perceived difficulty: 2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
yeti-platform/yeti#1380 ·