Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Remote attach debug server not dying upon killing the attached process

未关闭
#1,783 19 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@StellaHuang95 已经在做这个了。

开始于 2024年12月16日。

评估

这个 Issue 还没有评估数据。

描述

bug needs repro

Type: Bug

Behaviour

Extremely frequently the VS Code remote attach debugger will not die when I kill the python -m debugpy ... process that is attaching to the port 5678. Until I restart the IDE I cannot start debugging again, because otherwise it will complain that "Python debugger is already debugging another instance". My colleaques haven experiened this issue as well, and it seems to be a recent regression (last couple of weeks).

As I wrote this, I cannot click the "Create on GitHub" button because VSCode is seeming unresponsive. I resolved by restarting the IDE.

Steps to reproduce:

  1. Use the below config for debugger
  2. Run python -m debugpy --wait-for-client --listen 5678 /path/to/module.py
  3. Run debugger
  4. Either detach debugger or CTRL-C the process on command line

Diagnostic data

launch.json configuration

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [

        {
            "name": "Python: Remote Attach",
            "type": "python",
            "request": "attach",
            "connect": {
                "host": "localhost",
                "port": 5678
            },
            "pathMappings": [
                {
                    "localRoot": "${workspaceFolder}",
                    "remoteRoot": "."
                }
            ],
            "justMyCode": false
        }
    ]
}

Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)

XXX

Output for Python Debugger in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python Debugger)

XXX

Extension version: 2024.15.2024121301
VS Code version: Code 1.95.3 (f1a4fb101478ce6ec82fe9627c43efbf9e98c813, 2024-11-13T14:50:04.152Z)
OS version: Windows_NT x64 10.0.22631
Modes:
Remote OS version: Linux x64 4.18.0-372.32.1.el8_6.x86_64
Remote OS version: Linux x64 4.18.0-372.32.1.el8_6.x86_64
Remote OS version: Linux x64 4.18.0-372.32.1.el8_6.x86_64
Connection to 'SSH: zbs-carp2' could not be established Canceled
Remote OS version: Linux x64 4.18.0-372.32.1.el8_6.x86_64

  • Python version (& distribution if applicable, e.g. Anaconda): 3.8.19
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Conda
System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i9-11950H @ 2.60GHz (16 x 2611)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 63.73GB (37.47GB free)
Process Argv --folder-uri vscode-remote://ssh-remote%2Bzbs-carp2/physical/gpfs/carp2-home/car_home02/data_files/jcs/zsilversmith/dev/git/eis3 --crash-reporter-id 2a67a766-b9ca-442f-87e6-12fdf4c1e37f
Screen Reader no
VM 0%
Item Value
Remote SSH: zbs-carp2
OS Linux x64 4.18.0-372.32.1.el8_6.x86_64
CPUs AMD EPYC 7763 64-Core Processor (128 x 0)
Memory (System) 2014.91GB (1217.89GB free)
VM 0%
Item Value
Remote SSH: zbs-carp2
OS Linux x64 4.18.0-372.32.1.el8_6.x86_64
CPUs AMD EPYC 7763 64-Core Processor (128 x 0)
Memory (System) 2014.91GB (1217.89GB free)
VM 0%
Item Value
Remote SSH: zbs-carp2
OS Linux x64 4.18.0-372.32.1.el8_6.x86_64
CPUs AMD EPYC 7763 64-Core Processor (128 x 0)
Memory (System) 2014.91GB (1217.89GB free)
VM 0%

Connection to 'SSH: zbs-carp2' could not be established Canceled

Item Value
Remote SSH: zbs-carp2
OS Linux x64 4.18.0-372.32.1.el8_6.x86_64
CPUs AMD EPYC 7763 64-Core Processor (128 x 0)
Memory (System) 2014.91GB (1217.89GB free)
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythonnoceb:30805159
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
dvdeprecation:31068756
dwnewjupyter:31046869
newcmakeconfigv2:31071590
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc1:31192215
cf971741:31144450
iacca1:31171482
notype1:31157159
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
6074i472:31201624

主要语言
Python
星标
2.5k
派生
208
平均合并
1 天 43 分钟
30 天内合并 PR
6

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/debugpy 的其他 Issue

查看 microsoft/debugpy 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。