From 3da724f42fb7d9a739848a508705abe708d340a8 Mon Sep 17 00:00:00 2001 From: dl92 Date: Thu, 8 Jan 2026 00:44:03 +0000 Subject: [PATCH] named launch.json file Run and debug executables built by CMake. Pass arguments, environment variables, and control debugger behavi --- cplusplus/learning/.vscode/launch.json | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 cplusplus/learning/.vscode/launch.json diff --git a/cplusplus/learning/.vscode/launch.json b/cplusplus/learning/.vscode/launch.json new file mode 100644 index 0000000..1e9f166 --- /dev/null +++ b/cplusplus/learning/.vscode/launch.json @@ -0,0 +1,39 @@ +{ + // 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": "Run tut1", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/build/tut1/tut1", + "args": ["arg1", "arg2"], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + }, + { + "name": "Run tut2 with options", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/build/tut2/tut2", + "args": [], + "stopAtEntry": true, + "cwd": "${workspaceFolder}", + "environment": [ + { "name": "MY_FLAG", "value": "1" } + ], + "externalConsole": true, + "MIMode": "gdb" + }] +} \ No newline at end of file