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

debugpy.configure(python=) is not properly documented

Aperta Adatta ai principianti
#1,097 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
62/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python
Ambito
documentation

Direzione di ricerca

Iniziate dalla documentazione di debugpy.configure(python=), insieme alla configurazione dell’ascolto tramite debugpy.listen e debugpy.wait_for_client. Verificate il comportamento di sys.executable in un ambiente Python ospitato o incorporato, quindi documentate la ricorsione o il fallimento della connessione e la configurazione prevista dell’eseguibile.

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

Descrizione

documentation

Before creating a new issue, please check the FAQ to see if your question is answered there.

Environment data

  • debugpy version: XXX (run import debugpy; print(debugpy.__version__) if uncertain)
  • OS and version: XXX
  • Python version (& distribution if applicable, e.g. Anaconda): XXX
  • Using VS Code or Visual Studio:

Actual behavior

The parent program seemingly recursively gets created and started as a process without any easy way to kill the large number of processes created.

Expected behavior

It attached and works...

Steps to reproduce:

  1. Embed python into a program using the C API.
  2. Make a top level script that includes debugpy debugging... import debugpy, debugpy.listen, debugpy.wait_for_client, etc..
  3. Have parent program run and execute the top level script.

Not sure if this is a bug or is explained elsewhere. I am not going to spend the time to get involved and go through the forum. I am only leaving this here as a "gotcha" for a lonely passerby who ends up in the same scenario. Please edit / move as necessary.

In my use case, I want debugpy debugger support in a hosted (embedded) python environment. The user calls the user program and not python.exe. As such, sys.executable gets set to the exe of the program and not the expected python.exe. Why does this cause an infinite process recursion or fail to connect to the client debugger?

image

That would be why.

Moral of the story is.. make sure your sys.executable is set to python.exe in the hosted environment before using debugpy with the listening setup.

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

Preparare l'ambiente

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.