debugging miDebuggerPath无效

w41d8nur  于 2023-04-30  发布在  其他
关注(0)|答案(1)|浏览(123)

我正在创建一个json文件来调试。我一直收到错误消息,说我的miDebuggerPath无效。这是我的发射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}/Matrix_public_test.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            //"miDebuggerPath": "/path/to/gdb",
            "miDebuggerPath": "usr/bin/gdbus",
            //"miDebuggerPath": "C:\\MinGW64\\bin\\gdb.exe",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ]
        }
    ]
}
wgx48brx

wgx48brx1#

JSON相关

JSON中不允许使用注解。
虽然非常相似,但请记住JSON不是Javascript。删除注解后,您的Json在以下位置干净地验证:https://jsonlint.com/试试看。
推广JSON数据格式的道格拉斯Crockford故意删除了JSON中的注解,以防止JSON格式的滥用,并将其保留为仅数据格式。
如果你真的想拥有有效的JSON,你需要删除注解。

路径相关

你的道路是相对的,你似乎需要一条绝对的道路。在开始处添加斜线。

相关问题