Skip to content

Too many cl installations when selecting a configuration #8168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jureid opened this issue Sep 17, 2021 · 2 comments
Closed

Too many cl installations when selecting a configuration #8168

jureid opened this issue Sep 17, 2021 · 2 comments
Assignees
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service tasks/build/debug An issue relating to tasks.json (e.g. build issues)

Comments

@jureid
Copy link
Contributor

jureid commented Sep 17, 2021

Bug type: Language Service

Describe the bug

  • OS and Version: Windows 11
  • VS Code Version: 1.60.1
  • C/C++ Extension Version: 1.6.0

When selecting a configuration to debug the active file, the C++ extension is listing a bunch of MSVC installations and it's unclear what the difference between them is because the compiler path isn't shown:

image

Steps to reproduce

  1. Open a clean helloworld project (no tasks.json, no launch.json)
  2. Select Run > Start debugging
  3. Select Windows as the environment
  4. See error

Expected behavior
We should use the installation from the most recent version of VS and show the compiler path

@jureid jureid changed the title Too many cl installations when selecting a configuraiton Too many cl installations when selecting a configuration Sep 17, 2021
@Colengms
Copy link
Contributor

I thought perhaps the right fix here might be to display full paths for each, as each entry refers to a different combination of: VS install, target and host. But, the user is then prompted to launch VS Code from a VS Command prompt (if they haven't already done so), which would have to match the selected cl.exe. It might be simpler to reduce this list to just one entry, and allow the user to choose which version of cl.exe based on which variation of the "Native Tools Command Prompt" they chose.

If we do list all available options, we might want to also set up the build environment properly for that selected compiler (target/host), instead of requiring the user to launch from a VS command prompt.

@sean-mcmanus
Copy link
Contributor

Yeah, in order to fix #5271 we needed to get the full path to cl.exe in order to determine which build environment to use.

@bobbrow bobbrow added this to the 1.8.0 milestone Sep 21, 2021
@elahehrashedi elahehrashedi self-assigned this Sep 24, 2021
@bobbrow bobbrow modified the milestones: 1.8.0, On Deck Dec 7, 2021
@bobbrow bobbrow added tasks/build/debug An issue relating to tasks.json (e.g. build issues) and removed Language Service labels Dec 7, 2021
@Colengms Colengms self-assigned this Dec 10, 2021
@Colengms Colengms added fixed Check the Milestone for the release in which the fix is or will be available. Language Service labels Dec 14, 2021
@Colengms Colengms modified the milestones: On Deck, 1.8.0 Dec 14, 2021
@sean-mcmanus sean-mcmanus modified the milestones: 1.8.0, 1.8.0-insiders3 Dec 14, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Mar 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service tasks/build/debug An issue relating to tasks.json (e.g. build issues)
Projects
None yet
Development

No branches or pull requests

5 participants