launch.json file for cpp debugging is showing error. help me to rectify it
{
"version": "0.2.0",
"configurations": [
{
"name": "g++.exe - Build and debug active file",
"type": "by-gdb",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:\\Program Files\\mingw-w64\\x86_64-8.1.0-posix-seh-rt_v6-rev0\\mingw64\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: g++.exe build active file"
}
]
}
It is showing 7 errors in it
Property args is not allowed.
Property stopAtEntry is not allowed.
Property environment is not allowed.
Property externalConsole is not allowed.
Property MIMode is not allowed.
Property miDebuggerPath is not allowed.
Property setupCommands is not allowed.
Change "type" to "cppdbg".
This isn't documented anywhere but half the extra debugging properties for C++ don't work if your type is not "ccpdbg" (if you're debugging gdb or lddb) or "cppvsdbg" if you're debugging with VS.
I ran into the same issue when using "type": "lldb".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With