-
I'm using vscode version "1.96.2" and I'm trying to modify .vscode/launch.json , to debug a C program which require {
// 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}/v",
"args": [],
"environment": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
// "environment": [],
"externalConsole": false,
"MIMode": "gdb",
"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": "build with Makefile",
}
]
} |
Beta Was this translation helpful? Give feedback.
Answered by
litianhe
Dec 29, 2024
Replies: 1 comment
-
has solved this questions by using .vscode/launch.json like below: {
// 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}/x",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb",
"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": "build with Makefile",
"linux": {
"pipeTransport": {
"pipeProgram": "sudo",
"pipeArgs": [
"-S",
"gdb",
"--interpreter=mi"
],
"debuggerPath": "/usr/bin/gdb"
}
}
}
]
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
litianhe
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
has solved this questions by using .vscode/launch.json like below: