Open pclausen opened 2 years ago
The additionalSOLibSearchPath
is used to send set solib-search-path [Directories]
to GDB.
If GDB does not update the LD_LIBRARY_PATH
with that command, I believe it expects the executable to be runnable without a debugger.
If the executable runs without setting LD_LIBRARY_PATH, then there will be an issue if it fails to run with the debugger in the same environment.
Bug type: Debugger
Description additionalSOLibSearchPath is not respected in debuging session using remote debugger from windows to linux using ssh.
According to maintainer in vscode-remote-release the issue is in debugger, not in the remote extension, see https://github.com/microsoft/vscode-remote-release/issues/5748
Work around is to use "environment": [{ "name": "LD_LIBRARY_PATH", "value": "/path_to_libImportantLib/" },
Details
To Reproduce
/path_to_libImportantLib/
where libraries are found eg.libImportantLib.so
additionalSOLibSearchPath
--> gdb fails as expected, output in gdb terminalexe_to_debug: error while loading shared libraries: libImportantLib.so: cannot open shared object file: No such file or directory
Launch.json
set"additionalSOLibSearchPath": "/path_to_libImportantLib/"
Expected: Successful debugging Current Result: Same error as (2) `exe_to_debug: error while loading shared libraries: libImportantLib.so: cannot open shared object file: No such file or directoryWorkaround: Debugging works if I add following to
Launch.json
: