-
Hi, In my current setup my bash environment for running my tool is automatically configured when the terminal is opened. There are quite alot of different configurations controlled by environment variables which I'd really prefer to avoid replicating in the launch.json. Under the gdb setup when the debugger is invoked a new shell is opened, my environment is automatically setup, and then gdb is run and inherits that environment. When I try this with vscode-lldb a terminal opens and I see the output that says the environment is automatically being configured, but that is then wiped and when the tool is run under the debugger the environment is not configured. Is this expected behaviour? And is there anything I can do to resolve this (apart from putting all the various env vars in the launch.json)? TIA. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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.
Yes.
Well, lldb is scriptable. If you run a script as a part of the |
Beta Was this translation helpful? Give feedback.
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.
Yes.
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 (vialldb.target.GetEnvironment()
).