在Linux上调试VisualStudio代码的Python C++扩展

2024-04-26 20:33:47 发布

您现在位置:Python中文网/ 问答频道 /正文

我编写了一些Python C++扩展,我想在使用Python(交互地)使用Linux上的VisualStudio代码的同时调试它。你知道吗

我已经准备好了启动.json附件如下。基本上它是使用我的python解释器作为程序

    { 
        "name": "(gdb) Attach",
        "type": "cppdbg",
        "request": "attach",
        "program": "/home/mike/.pyenv/versions/anaconda3/bin/python",
        "processId": "${command:pickProcess}",
        "MIMode": "gdb",
        "setupCommands": [
            {
                "description": "Enable pretty-printing for gdb",
                "text": "-enable-pretty-printing",
                "ignoreFailures": true
            }
        ]
    },

不幸的是,什么也没发生。我对visualstudio的调试代码还很陌生,所以我可能遗漏了一些琐碎的东西。你知道吗


Tags: 代码name程序json附件requestlinuxtype