microsoft / microsoft/vscode-python-debugger
Debug launch kills Tkinter GUI process after recent update; plain terminal run is stable
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 181
- Fork
- 126
- Merge trung bình
- 2 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 3
Mô tả
Summary
After recent updates, debugging a Tkinter GUI with F5 becomes unstable. The GUI process exits suddenly without Python traceback. Running the same app with plain Python is stable.
Environment
VS Code: 1.124.0 (commit 1b50d58d73426c9171299ec4037d01365d995b78, x64)
Python extension: ms-python.python-2026.4.0-win32-x64
Debugpy extension: ms-python.debugpy-2026.6.0-win32-x64
Pylance: ms-python.vscode-pylance-2026.2.1
OS: Windows
Interpreter: workspace venv [python.exe]
Repro steps
Open a Tkinter GUI app in VS Code.
Start debugging with F5 using a launch config of type debugpy, request launch, program app_gui.py, console integratedTerminal or externalTerminal.
Let the app run without interaction for about 30 to 90 seconds.
GUI exits unexpectedly.
Expected behavior
GUI should keep running until user closes it or app throws a visible Python exception.
Actual behavior
Process exits abruptly.
No Python traceback.
No OS crash event for python.
Internal app heartbeat logs stop suddenly.
Important control test
Running the same GUI via plain terminal command is stable:
[python.exe] [app_gui.py]
Additional evidence
Python extension log repeatedly shows debug launch commands through debugpy launcher:
Send text to terminal ... debugpy\launcher ... -- [app_gui.py]
App-side diagnostics show debugger_attached=False in failing runs, and process chain python -> python -> app_gui before sudden exit.
No fault traceback captured.
Workaround
Attach mode is stable:
Start app manually with debugpy listen.
Use debugpy attach config from VS Code.
This avoids VS Code owning the app process lifecycle.
Question
Was there a recent regression/change in debug launch process lifecycle handling on Windows in ms-python.python 2026.4.0 or debugpy 2026.6.0?
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
Không có tệp nguồn hoặc bài kiểm thử nào được nêu. Hãy bắt đầu bằng cách tái hiện ứng dụng Tkinter với cấu hình khởi chạy F5 debugpy trên Windows, sau đó so sánh vòng đời tiến trình của nó với các lần chạy ổn định trong terminal thuần và chế độ attach. Theo dõi các log của debugpy launcher và Python extension xung quanh lần thoát bất ngờ; hoàn tất khi xác định được hồi quy hoặc một bài kiểm thử thất bại tập trung vào hành vi khởi chạy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python, typescript, vscode
- Lĩnh vực
- developer-experience, devtools
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100