microsoft / microsoft/vscode-python-debugger

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

Aperta
#1,052 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

triage-needed
Lingua principale
TypeScript
Stelle
181
Fork
126
Merge medio
2g 3h
PR unite (30g)
3

Descrizione

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?

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Non sono indicati né un file sorgente né un test. Inizia riproducendo l’app Tkinter con la configurazione di avvio F5 debugpy su Windows, quindi confronta il suo ciclo di vita del processo con quello delle esecuzioni stabili in un terminale semplice e in modalità attach. Traccia i log del launcher debugpy e di Python extension intorno all’uscita imprevista; il lavoro è concluso quando viene identificata la regressione o un test mirato che fallisce per il comportamento di avvio.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python, typescript, vscode
Ambito
developer-experience, devtools
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.