Run remote Debug success,But restart Debug errorInfo-show: connect ECONNREFUSED ip-address:5678
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Tái hiện quy trình remote attach và khởi động lại bằng launch.json, task.json và main.py, bắt đầu từ các lệnh gọi debugpy.listen() và debugpy.wait_for_client(). Kiểm tra cách attach thứ hai được khởi tạo sau phiên đầu tiên và xác minh rằng việc khởi động lại duy trì kết nối thay vì tạo ra ECONNREFUSED trên cổng 5678.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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}")
- Ngôn ngữ chính
- Python
- Star
- 2.5k
- Fork
- 202
- Merge trung bình
- 5 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 1
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/debugpy
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Document "rules"-option Đang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Adapter bootstrap fails with ConnectionRefusedError on WSL2 VirtioProxy or hostAddressLoopback Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
Tất cả issue của microsoft/debugpy
Issue tương tự
-
[Bug] reef-hermes tells me to resume with hermes --resume, which does not work from my shell Đang mởarea: harness bug status: needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Human-Agent-Society/reef#625 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
learningequality/kolibri#15351 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Name consistency Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
eellak/triplestore#65 · 1 bình luận ·