0% found this document useful (0 votes)
96 views

Visual Studio Code

This document contains two configurations for debugging C++ programs in Visual Studio Code. The first configuration builds and debugs the active file using g++ and gdb, displaying output in the debugger. The second configuration builds, runs, and attaches gdb to the active file, displaying output in an external console. Both configurations use g++ and gdb from MinGW, and enable pretty printing for gdb.

Uploaded by

Arjun Bhargava
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views

Visual Studio Code

This document contains two configurations for debugging C++ programs in Visual Studio Code. The first configuration builds and debugs the active file using g++ and gdb, displaying output in the debugger. The second configuration builds, runs, and attaches gdb to the active file, displaying output in an external console. Both configurations use g++ and gdb from MinGW, and enable pretty printing for gdb.

Uploaded by

Arjun Bhargava
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

{

"version": "0.2.0",
"configurations": [
{
"name": "g++.exe build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false, //set to true to see output in cmd instead
"MIMode": "gdb",
"miDebuggerPath": "C:\\MinGW64\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "g++.exe build active file"
},
{
"name": "g++ build & run active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true, //set to true to see output in cmd instead
"MIMode": "gdb",
"miDebuggerPath": "C:\\MinGW64\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "g++ build & run active file"
}
]
}

You might also like