-
Notifications
You must be signed in to change notification settings - Fork 256
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
envFile
is not accepted in launch configuration in Linux/WSL
#968
Comments
You are missing |
@vadimcn it's not missing, it was simply covered up by the hover text. I've moved it to the top so you can see the full thing: |
|
Hmm ok. I was hoping to read in an env var from a file using envFile and use that variable in the configuration. |
With that in mind, I think envFile makes sense but env does not, correct? |
If you want to use expand an environment variable into the launch configuration, you can use this syntax: |
Right, but I'm unable to use environmental variables stored in a file because |
Sorry, I'll update the issue name. My primary issue is this: I have a python debugging instance that I need to attach the rust LLDB debugger to. I need to send the process ID to the launch configuration. I'm currently doing it using an extra extension that parses the pID from a shell command, but this requires a 3rd-party requirement that I'd like to remove from the process (the shell command extension). I'm instead writing the pID to an environmental variable file, which I'd like the LLDB launch configuration to read from, but the |
envFile
is not accepted in launch configuration in Linux/WSL
I suppose you could create a custom launch configuration and use Python script(s) to read pid from a file and then use it to attach. |
@vadimcn right--I would like the LLDB launch configuration to be able to read an environmental variable from a file so that it's used when launching the LLDB process. According to #866, this was implemented in 1.9.1, but it appears to have only been implemented for Windows and doesn't work in Linux, unless I'm doing something wrong. Thank you for the link to custom launches, I will look into that. |
It was never meant to make envFile entries to be available for expansion into launch.json. What you describe shouldn't be possible... unless VSCode somehow reads it for you. |
Hi @vadimcn, are you willing to help me a bit? I'm attempting go the custom launch route but having a bit of trouble. This is a joint Python+Rust process. I've managed to get LLDB to attach within VSCode to the process (so I know that it works), but it requires some manual work and I'm trying to automate the process. Here are my steps:
I'm having a bit of trouble disagnosing here. Is my url malformed? Thank you!! |
Ok, this was a WSL issue and involved the vscode server cache not being invalidated: microsoft/vscode-remote-release#6997. I've made a little progress, I'll look into this some more. |
OS: Windows 11 / WSL
VSCode version: 1.80.1
CodeLLDB version: v1.9.2`
Compiler: N/A
Debuggee: N/A
When VSCode is open in Windows, I can use

env
adnenvFile
in mylaunch.json
just fine. When I open VSCode and attach to WSL, however, I cannot use either:The text was updated successfully, but these errors were encountered: