Run remote Debug success,But restart Debug errorInfo-show: connect ECONNREFUSED ip-address:5678
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Riproduci il flusso di remote attach e riavvio usando launch.json, task.json e main.py, iniziando dalle chiamate a debugpy.listen() e debugpy.wait_for_client(). Verifica come viene avviato il secondo attach dopo la prima sessione e verifica che il riavvio mantenga la connessione invece di produrre ECONNREFUSED sulla porta 5678.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Environment data
- OS: Ubuntu 22.04
- Python version (& distribution if applicable, e.g. Anaconda): 3.8.10
- debugpy version:1.8.1
- Using VS Code or Visual Studio: VSCode 1.88.1, Terminal
Actual behavior
I can connect normally with debugging and debugging normally,But click to re -debug, you will prompt an error and exit the debugging
Expected behavior
If I click to restart the debugging, I should continue the normal debugging process
error: connect ECONNREFUSED ip-address:5678
Steps to reproduce:
vscode:
launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "connect to remote server",
"type": "debugpy",
"request": "attach",
"preLaunchTask": "Run_Python",
"connect": {
"host": "ip-address",
"port": 5678
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "/home/xxx/py/py/"
}
],
"justMyCode": true
}
]
}
task.json:
{
"version": "2.0.0",
"tasks": [
{
"label": "Run_Python",
"type": "shell",
"command": "ssh -tt xxx@ip-address 'python /home/xxx/py/py/main.py'",
"args": [],
"isBackground": true,
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": {
"owner": "python",
"source": "debugpy",
"fileLocation": [
"relative",
"${workspaceFolder}"
],
"pattern": [
{
"regexp": "\\s+(.*)$",
"message": 1
},
{
"regexp": "Connection to closed",
"file": 1,
"line": 1,
"column": 1
}
],
"background": {
"activeOnStart": false,
"beginsPattern": {
"regexp": "start"
},
"endsPattern": {
"regexp": "Waiting for debugger attach"
}
}
},
"presentation": {
"echo": true,
"panel": "shared",
"focus": true,
"clear": true
}
}
]
}
code:
print("start")
import debugpy
# 5678 is the default attach port in the VS Code debug configurations. Unless a host and port are specified, host defaults to 127.0.0.1
debugpy.listen(('0.0.0.0', 5678))
print("Waiting for debugger attach")
debugpy.wait_for_client()
debugpy.breakpoint()
def add_fun(a, b):
a = a * 10
b = b * 100
c = a + b
return c
if __name__ == '__main__':
a = 10
b = 78
c = add_fun(a, b)
c = c
print(f"a + b = {c}")
- 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
- 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"-option Apertadocumentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
Adapter bootstrap fails with ConnectionRefusedError on WSL2 VirtioProxy or hostAddressLoopback Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
Tutte le issue di microsoft/debugpy
Issue simili
-
area: harness bug status: needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Human-Agent-Society/reef#625 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
learningequality/kolibri#15351 · 2 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Name consistency Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
eellak/triplestore#65 · 1 commento ·