Skip to content

Environment from terminal rather than launch.json #542

Answered by vadimcn
bbennetts asked this question in Q&A
Discussion options

You must be logged in to vote

Codelldb does not run in the terminal, it merely attaches to that TTY device. As far as the process tree is concerned, both the debugger and the debuggee remain children of one of the VSCode processes.

Is this expected behaviour?

Yes.

And is there anything I can do to resolve this (apart from putting all the various env vars in the launch.json)?

Well, lldb is scriptable. If you run a script as a part of the preRunCommands sequence, you can programmatically update the launch environment of the future debuggee (via lldb.target.GetEnvironment()).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bbennetts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants