【问题标题】:How to debug a specific binary using VS Code on Ubuntu如何在 Ubuntu 上使用 VS Code 调试特定的二进制文件
【发布时间】:2018-06-14 09:21:15
【问题描述】:

我想调试一个 Python 二进制文件,然后按照 here 的建议调用 scipy C++ 模块(我想单步执行这些模块)。我可以使用命令行 gdb 成功地做到这一点

gdb --args python runtests.py -g --python mytest.py

我可以在 Eclipse 中通过将二进制设置为:

/usr/bin/python3

和调试器的参数为

runtests.py -g --python mytest.py

我可以在 Visual Studio Code 中以某种方式做到这一点吗?

【问题讨论】:

    标签: c++ ubuntu debugging visual-studio-code


    【解决方案1】:

    所以我在 launch.json 文件中创建了一个新的启动配置(通过单击调试器中的配置齿轮图标),将程序设置为

    /usr/bin/python3
    

    参数到

    runtests.py -g --python mytest.py
    

    并添加了

    "break" : "NI_ZoomShift"
    

    设置命令。然后只需运行在我的情况下称为 (gdb) scipy 的新配置,它就可以工作了。

    This 链接很有帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-11-24
      • 2022-10-19
      • 1970-01-01
      • 1970-01-01
      • 2019-05-30
      • 2020-01-01
      • 2022-01-11
      • 2021-05-10
      相关资源
      最近更新 更多