microsoft / microsoft/vscode-cpptools
envFile values not propagated to Debugger
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Type: Debugger
Describe the bug
- OS and Version:
Linux - Fedora 31 Linux 5.5.11-200.fc31.x86_64 #1 SMP Mon Mar 23 17:32:43 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
- VS Code Version:
Version: 1.43.2
Commit: 0ba0ca52957102ca3527cf479571617f0de6ed50
Date: 2020-03-24T07:52:11.516Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 5.5.11-200.fc31.x86_64
- C/C++ Extension Version:
C/C++ for Visual Studio Code Change Log
Version 0.27.0-insiders5: March 26, 2019
- Other extensions you installed (and if the issue persists after disabling them):
N/A
- 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:
UNIQUE_VARIABLE="test1":"test2":"quoted string":unquoted string
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the C++ debugger launch configuration from launch.json with the Linux envFile and the test_envFile.env value shown in the report. Use the debug console command "-exec show env"; the issue is fixed when UNIQUE_VARIABLE appears in the debuggee environment output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100