Open aleksas opened 1 year ago
Following lounch command almost runs as expected. Valgrind output shows an error that an .so dependency was not found. Apparently LD_LIBRARY_PATH value was not passed to valgrind.
"configurations": [ { "name": "(gdb) Launch", "type": "cppdbg", "request": "launch", "program": "${command:cmake.launchTargetPath}", "args": [ "-arg1", "value1", "-arg2", "value2" ], "stopAtEntry": false, "cwd": "${workspaceFolder}", "externalConsole": false, "MIMode": "gdb", "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true }, { "description": "Additional libs for gdb", "text": "set environment LD_LIBRARY_PATH=${workspaceFolder}/build:[OTHER_PATHS]:$LD_LIBRARY_PATH", "ignoreFailures": false }, { "description": "Additional asan lib for gdb", "text": "set environment LD_PRELOAD=/usr/lib/gcc/x86_64-linux-gnu/8/libasan.so", "ignoreFailures": false }, { "description": "Connect to valgrind", "text": "${command:valgrind-task-integration.valgrindGdbArg}", "ignoreFailures": true } ] }, ]
If "preLaunchTask": "valgrind-debug", is used then VSCode shows an error
"preLaunchTask": "valgrind-debug",
Following lounch command almost runs as expected. Valgrind output shows an error that an .so dependency was not found. Apparently LD_LIBRARY_PATH value was not passed to valgrind.
If
"preLaunchTask": "valgrind-debug",
is used then VSCode shows an errorEnv