-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting LD_LIBRARY_PATH environment variable #616
Comments
@dhiraj113 can you paste your entire launch.json please? |
Below is my launch.json file
|
@dhiraj113 just want to know have you solved this or not and how? |
Have same problem with Visual Studio 2017 and open-folder feature. Any solution? |
@Elemental239 if you enable logging, you should be able to see that we send the command to gdb using To see logging in Visual Studio 2017, go to the In VS Code it is done by adding |
relative path example { |
) * Fix for hang with VS on gdb error message * Hang was because gdb on MinGW/Cygwin would send ^error but not flush. Fix is to send additional newline at the end of every command if we are running local launch on gdb on windows * Fix for error messages during continue or step showing useless message in VS. Fix is to catch the exceptions instead of letting it go through, return the actual exception's message and send E_ABORT * Code review Feedback
At least for debugger the only way I was able to set LD_LIBRARY_PATH was by passing it to gdb via "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}/<rel_path>:${workspaceFolder}/<other_rel_path>:$LD_LIBRARY_PATH",
"ignoreFailures": false
}
] |
I have tried like this in tcsh |
If anyone found this while searching on how to set LD_LIBRARY_PATH for gdbserver in Visual Studio, here you go: |
I found that the "environment" section of launch.json on Lubuntu 21.10 worked differently than on 21.04. The following is what I am using.
I'm filing this one under "Go Figure". |
This way worked after change default terminal from tcsh to bash |
It is still broken today version 1.90. The only solution for me was using "envFile" in launch.json, and create an environment file |
I think I figured it out. We should use VSCode's variables to get to the environement's variables. In other words, use ${env:<variable>} in this case this worked for me: "environment": [
{
"name": "LD_LIBRARY_PATH",
"value": "/my/path/:${env:LD_LIBRARY_PATH}"
}], |
I am unable to set LD_LIBRARY_PATH environment variable on Ubuntu 16.04 for executable run through vscode. I am using the below launch.json configuration for setting the environment variable.
The text was updated successfully, but these errors were encountered: