diff --git a/.vscode/launch.json b/.vscode/launch.json index 68f880b..e0d038b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,7 +2,7 @@ "version": "0.2.0", "configurations": [ { - "name": "(gdb) Launch", + "name": "Launch Debugger", "type": "cppdbg", "request": "launch", // Resolved by CMake Tools: @@ -16,10 +16,6 @@ // it gets resolved by CMake Tools: "name": "PATH", "value": "$PATH:${command:cmake.launchTargetDirectory}" - }, - { - "name": "OTHER_VALUE", - "value": "Something something" } ], "externalConsole": true, @@ -31,6 +27,38 @@ "ignoreFailures": true } ] + }, + { + "name": "Launch Debugger with valgrind", + "type": "cppdbg", + "request": "launch", + // Resolved by CMake Tools: + "program": "${command:cmake.launchTargetPath}", + "args": [], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [ + { + // add the directory where our target was built to the PATHs + // it gets resolved by CMake Tools: + "name": "PATH", + "value": "$PATH:${command:cmake.launchTargetDirectory}" + } + ], + "externalConsole": true, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + }, + { + "description": "Connect to valgrind", + "text": "${command:valgrind-task-integration.valgrindGdbArg}", + "ignoreFailures": true + } + ] } ] } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index afc9946..2c4116f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -101,6 +101,7 @@ "/home/jbnadal/sources/jb/raytracer_challenge/build/apps/CMakeFiles/chapter_05.dir", "/home/jbnadal/sources/jb/raytracer_challenge/build/apps/CMakeFiles/chapter_06.dir", "/home/jbnadal/sources/jb/raytracer_challenge/build/apps/CMakeFiles/chapter_07.dir", + "/home/jbnadal/sources/jb/raytracer_challenge/build/apps/CMakeFiles/chapter_09.dir", "/home/jbnadal/sources/jb/raytracer_challenge/build/tests/CMakeFiles/raytracing_test.dir" ] } \ No newline at end of file