microsoft / microsoft/vscode-cpptools
VS Code 'terminal.integrated.env.*' settings not taken into account for 'miDebuggerPath'
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Environment
- OS and version: Ubuntu 20.04.6 LTS (Focal Fossa)
- VS Code: 1.85.1
- C/C++ extension: 1.18.5
Bug Summary and Steps to Reproduce
Bug Summary:
The terminal.integrated.env.* VS Code settings are not taken into account for the miDebuggerPath option default value.
This creates some discrepancy between the GDB program that can be run from a VS Code Terminal for this workspace and the one actually used by the extension.
My suggestion would be to take into account the terminal.integrated.env.* VS Code settings while computing the default GDB program, when miDebuggerPath is not explicitly configured in the launch.json file.
Steps to reproduce:
- Open the reproducer
- Modify
terminal.integrated.env.linuxsetting to set thePATHenvironment variable to custom GDB installation - Launch the C/C++ debugger (
C++ Launchin theDebug Panel) - Problem: the GDB used by the extension (with the version displayed in the
Debug Console) will not match the one available from a VS CodeTerminal
Debugger Configurations
All the needed configuration files are in the `.vscode` folder of the following archive:
[cpp_project.zip](https://github.com/microsoft/vscode-cpptools/files/13905675/cpp_project.zip)
Debugger Logs
No logs
Other Extensions
No response
Additional Information
No response
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
Start with the reproducer's .vscode configuration and launch.json, then run the C++ Launch configuration and compare the GDB version in the Debug Console with the one available from the VS Code Terminal. Done means terminal.integrated.env.linux, including a custom PATH, affects the default miDebuggerPath when launch.json does not set it explicitly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100