首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在VSC中调试C代码?来自命令"-exec-run“的意外GDB输出

在VSC中调试C代码?来自命令"-exec-run“的意外GDB输出
EN

Stack Overflow用户
提问于 2021-12-08 17:27:47
回答 1查看 461关注 0票数 0

因此,我试图在代码中调试我的C代码。我在windows上,我已经安装了cygwin,我想使用gdb来调试我的程序。

我的gdb版本: GNU gdb (GDB) (Cygwin 10.2-1) 10.2

gcc版: gcc (GCC) 9.3.0

我得到以下错误消息:错误:无法启动调试。来自命令"-exec-run“的意外GDB输出。创建过程出错..。

这是我正在使用的launch.json

代码语言:javascript
复制
{
    // 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": "gcc.exe - Build and debug active file",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "miDebuggerPath": "C:\\cygwin64\\bin\\gdb.exe",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "C/C++: gcc.exe build active file"
        }
    ]
}
EN

回答 1

Stack Overflow用户

发布于 2021-12-09 12:33:02

将gdb降级到9.2版似乎很管用!:)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70279267

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档