-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Environment variables don't work with LLDB #191
Comments
Did you mean "configuring the environment variable in launch.json ..."? |
Yes, both actually. Neither seem to work. |
Can you please post your complete launch.json? The way to get this to work would normally be via the "environment" option in the launch.json. |
@delmyers This is my launch.json
And this is my tasks.json
If I start a new bash shell without loading any environment however, I can debug my executable sucessfully:
Edit: This is the error message I am getting. This is the same as if I would have tried to debug my executable without exporting the previously mentioned environment variables
|
@edumunoz, can you take a look at this? |
Thanks for the bug report, @NewProggie! I am able to repro it. We will be changing the way environment variables are set. |
@edumunoz Nice, thanks. Will you keep us updated here? Can we expect an update any time soon? |
@edumunoz Was your fix included in the recently released version 0.9.1 (https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)? |
No, sorry. I will comment on this issue once the fix is released. |
@NewProggie This should be in our latest release |
Debugging works fine now. Thanks a lot! |
Hi, I have the same issue with the LLDB here. It is not working on my machine yet. Version: 1.46.1 Below is my launch.json file, `{
}` Then I got the following error, In the terminal I have no issue setting the environment variable. |
FYI: @WardenGnaw for macOS environment variable issues. It looks like the customer is trying to set debugger environment variables. @YLiu-5 Environment variables are set for the Debuggee and not the debugger. |
In the terminal I would type
Can you suggest what should I do in vscode to set the environment variable for the LLDB debugger? |
@YLiu-5 if you have the lldb command, you can try |
@pieandcakes I tried but to no avail. The setupCommands will not load the environment variable for me. Below is my launch.json file. `
} The output in debug console, The debug process is paused on exception. |
Can you include engine logging so we can see what the response from that command is? I don't have enough information to go off of but if that command works in LLDB then it should work in this instance too. |
Hi, I just made it work by adding the environment in the file setting.json, instead of launch.json. |
This issue has not been solved yet. Environment variables not set using codelldb on MacOS using launch.json |
I have no idea what you are talking about.
… On 09/16/2021 12:32 PM fventer ***@***.***> wrote:
This issue has not been solved yet. Environment variables not set using codelldb on MacOS using launch.json
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub #191 (comment) , or unsubscribe https://github.com/notifications/unsubscribe-auth/AKNPPZCHHYRIIOSROQ5FHMTUCIS3BANCNFSM4COH6J7Q .
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .
|
Imho in this case environment is set uncorrectly. It should be done this way: "version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'balcia-bdt-v2'",
"env": {
"RUST_BACKTRACE": "1"
}, |
yes, this is the correct way. |
Hey,
in order to debug my executable, I need to pass an environment variable to the debugger. On console this would be something like:
I already tried configuring
launch.json
with"setupCommands": [{"text": "env DYLD_LIBRARY_PATH=/my/foo/bar"}]
and"customLaunchSetupCommands": [{"text": "process launch -v DYLD_LIBRARY_PATH=/my/foo/bar"}]
of which neither seem to work. Unfortunately, I don't get any specific error messages other than that the lldb process returned some error.Configuring the environment variable in
tasks.json
to include those variables doesn't work either.Second, is there a way to get more debugging information from the debugger? The only information I'm currently getting is that lldb returned some malformed information, but not any details.
Edit: I'm using OS X 10.11.6 with VS Code version 1.4.0.
The text was updated successfully, but these errors were encountered: