c++ - 为什么 gdb 不能在带有 Visual Studio Code 的 Linux 中工作?
问题描述
我正在使用 Visual Studio Code 但我无法调试我的 c++ 代码。我搜索了很多,但我只找到了一个链接,它对我没有帮助。 关联
以下是我的 launch.json 文件:
{
// 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": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/mypro",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
错误: vsc 无法打开“raise.c”:无法读取文件(错误:找不到文件(/build/glibc-OTsEL5/glibc-2.27/sysdeps/unix/sysv/linux/raise.c))
当我在 Visual Studio 代码中启动调试器时出现上述错误。请任何对此有想法的人帮助我。提前致谢 !!
解决方案
推荐阅读
- javascript - 使用动态组件和自定义事件时的 VueJS 警告
- python-3.x - 为什么我在 Python 3.8 (Anaconda/Spyder) 中得到“KeyError: 'Context'”
- c++ - opengl查找矩阵到相机外在矩阵
- python - TensorFlow:启动缓慢
- java - 这个递归算法的名称?
- java - WebSocket握手期间出错:意外的响应代码:400 Spring boot websockets
- java - 如何禁用组合框中的项目?
- javascript - 获取按键字符代码的最佳实践/标准兼容方法
- flutter - flutter riverpod:如何测试 asyncvalue.error?
- angular - 错误 TS2322:类型“列表 | undefined' 不可分配给类型 'any[] (Iterable
& 任何[]) | (任何[] & 可迭代 ) | 空 | 不明确的'