我正在尝试在 VSCODE 中调试程序.该程序需要以 root 身份或在 Ubuntu 上使用sudo"启动.实现这一目标的最佳方法是什么?示例启动配置会有所帮助.谢谢.
I am trying to debug a program in VSCODE. The program needs to be launched as root or with "sudo" on Ubuntu. What's the best way to achieve this? An example launch configuration would be helpful. Thanks.
我做了以下事情:
pkexec/usr/bin/gdb "$@"
...
"externalConsole": false,
"miDebuggerPath": "/home/<username>/gdb",
"MIMode": "gdb",
...
top
等来验证进程是否以 root 身份运行.top
or such like to verify the process is running as root.应该够了.
这篇关于如何使用“sudo"调试程序在 VSCODE 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!