Debug launch kills Tkinter GUI process after recent update; plain terminal run is stable

Offen
#1,052 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Ruhig
Tech-Stack
python, typescript, vscode

Rechercherichtung

Es ist keine Quelldatei und kein Test angegeben. Beginne damit, die Tkinter-App mit der F5-debugpy-Startkonfiguration unter Windows zu reproduzieren, und vergleiche dann ihren Prozesslebenszyklus mit den stabilen Ausführungen im einfachen Terminal und im Attach-Modus. Verfolge die debugpy-Launcher- und Python-Extension-Logs rund um den unerwarteten Beendigungszeitpunkt; fertig ist die Untersuchung, wenn die Regression oder ein gezielter fehlschlagender Test für das Startverhalten identifiziert wurde.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

triage-needed

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?

Vorherrschende Sprache
TypeScript
Sterne
181
Forks
126
Ø Merge
2 T. 3 Std.
Gemergte PRs (30 T.)
3

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus microsoft/vscode-python-debugger

Alle Issues in microsoft/vscode-python-debugger

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.