local-lua-debugger-vscode
local-lua-debugger-vscode copied to clipboard
Question: is there a way to set environment variables within debugger settings?
I have a very long PATH and CPATH, which I'm copying and pasting into each launch.json configuration (of which I have quite a number).
Is there a way to set the PATH and CPATH once somewhere, perhaps in the extension settings? As far as I can see there is only 1 setting available.
That seems to be the way other debuggers handle the matter, though possibly there is another way to set environment variables for launch.json which I don't know about? (I'm still learning the ropes with VSCode).
(FYI, the reason the paths are so long is because I'm linking to code in my project plus dependencies installed in a virtual environment.)
Thanks! Great extension, just given you a good review :)
There isn't another way to do this right now, but it seems like a pretty straight-forward feature to add.
Thanks!
For now, I've learnt that you can pull arbitrary VSCode settings into launch.json (or tasks.json) like this:
"LUA_PATH": "${config:lua.debug.settings.path}",
In this case, using a setting I'd already configured for a different extension I'm no longer using.
I thought I'd be able to use {env:X}
and neatly solve my problem but while this worked on tasks.json, couldn't get it to work in launch.json.