microsoft / microsoft/vscode-python-debugger
Debug launch kills Tkinter GUI process after recent update; plain terminal run is stable
還沒有人認領這個 Issue。
- 主要語言
- TypeScript
- 星號
- 181
- 分支
- 126
- 平均合併
- 2 天 3 小時
- 30 天內合併 PR
- 3
描述
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?
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
未指定原始檔案或測試。先在 Windows 上使用 F5 debugpy 啟動組態重現 Tkinter 應用程式,然後將其程序生命週期與穩定的純終端機執行和 attach-mode 執行進行比較。追蹤意外結束前後 debugpy launcher 和 Python extension 的記錄;完成的標準是找出該回歸,或為啟動行為找到一個針對性的失敗測試。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python, typescript, vscode
- 領域
- developer-experience, devtools
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100