Open Smit-tay opened 4 years ago
in my case both "environment" and "envFile" not working .
only environment is fixed in the latest version of the extension. (Version 0.27.0: March 30, 2020)
Apparently, somehow "envFIle" is handled significantly differently than "environment" (go figure).
Please fix. This is killer bug
Type: Debugger
Describe the bug
VS Code Version:
C/C++ Extension Version:
Other extensions you installed (and if the issue persists after disabling them):
A clear and concise description of what the bug is: envFile is not propogated to the debugee. This can be demonstrated via the following launch.json entry:
{ "name": "(Debug) Test envFile", "type": "cppdbg", "request": "launch", // any debuggable application will suffice, we don't really debug it "program": "${workspaceFolder}/build/test", // because we stop on entry "stopAtEntry": true, "linux": { "internalConsoleOptions": "openOnSessionStart", "MIMode": "gdb", "envFile": "/home/jack/test_envFile.env", "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true }, ], }, "windows": { //"envFile": "C:\PATH_TO\test_envFile.env" }, "osx": { // Does anybody seriously develop under osx ? }, "externalConsole": false, },
Create a file named "test_envFile.env" which contains the following:
after launching - when the debugger stops on entry - issue this in the debug console: "-exec show env"
Then copy all output, paste into your favorite editor, and search for UNIQUE_VARIABLE
Expected result: UNIQUE_VARIABLE is present in the environment
Actual result: UNIQUE_VARIABLE is NOT present in the environment