Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Debugger times out if shell startup is "slow"

Aperta
#1,579 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Riproduci il timeout aggiungendo una lunga attesa a ~/.zshrc o ~/.bashrc, quindi avviando una sessione debugpy da VS Code. Traccia l'avvio del terminale e il passaggio del comando di debug; il lavoro è completato quando il debugger attende che la shell sia pronta e si avvia correttamente invece di scartare il comando.

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

Descrizione

bug

Environment data

  • debugpy version: v2024.6.0
  • OS and version: macos 14.4.1
  • Python version (& distribution if applicable, e.g. Anaconda): 3.10 CPython
  • Using VS Code or Visual Studio: VS Code

Actual behavior

Debugger never starts and shows "timeout" error window.
In the terminal output you can see that the debugger command has been "pasted"/send to the terminal but the terminal was not ready yet. Hence, the command is discarded.
Its very similar to the issue described here: https://github.com/microsoft/vscode-js-debug/issues/1642

Expected behavior

Debugger waits for terminal to finish and then sends the command to the terminal.

Steps to reproduce:

  1. add a slow command to shell startup, e.g. "sleep 120" to ~/.zshrc or ~/.bashrc
  2. start any debug session with debugpy
  3. debugger will timeout

Background:

I have a zshrc setup that includes some startup scripts which usually take ~0.5-3 seconds. I've never found a satisfying workaround for this and many of the suggested solutions in the Issues in this repo never worked for me.

Current Workaround:

Currently, I am using a setting which works well enough for me
Here is the link to the vscode docs: https://code.visualstudio.com/docs/terminal/profiles#_configuring-the-taskdebug-profile
and here is the setting for me:

{ 
  "terminal.integrated.automationProfile.osx": {
    "path": "bash",
  },
}

However, I wish this extension/debugger would support the same solution as https://github.com/microsoft/vscode-js-debug/issues/1642.

Lingua principale
Python
Stelle
2.5k
Fork
202
Merge medio
5g 1h
PR unite (30g)
1

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.

Altre issue di microsoft/debugpy

Tutte le issue di microsoft/debugpy

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.