debugpy.configure(python=) is not properly documented
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
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:
- Embed python into a program using the C API.
- Make a top level script that includes debugpy debugging... import debugpy, debugpy.listen, debugpy.wait_for_client, etc..
- 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?

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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/debugpy
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Document "rules"-optionApertadocumentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Adapter bootstrap fails with ConnectionRefusedError on WSL2 VirtioProxy or hostAddressLoopbackAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
Tutte le issue di microsoft/debugpy
Issue simili
-
#bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
apache/superset#44923 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
lawndoc/stack-back#123 ·
-
Add: EntuneAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
AbdelStark/awesome-typesafe-jev#187 ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
repowise-dev/repowise#2966 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 2 giorni