代码之家  ›  专栏  ›  技术社区  ›  Mike

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

  •  0
  • Mike  · 技术社区  · 6 年前

    我已经为attach设置了launch.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
                }
            ]
        },
    

    不幸的是,什么都没发生。我对Visual Studio代码的调试还很陌生,所以可能遗漏了一些琐碎的东西。

    1 回复  |  直到 6 年前
        1
  •  2
  •   Mike    6 年前

    这确实是微不足道的。只要附上正确的流程。把答案放在这里,因为在网上找到答案并不容易。

    推荐文章