microsoft / vscode-cmake-tools

CMake integration in Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=vector-of-bool.cmake-tools
MIT License
1.43k stars 430 forks source link

cmakeuserpresets.json not read by vscode-cmake-tools? #3725

Closed aiyolo closed 2 weeks ago

aiyolo commented 2 months ago

Brief Issue Summary

My CMake project folder has a cmakeuserpresets.json file, but the preset(both configure preset and build preset) is not loaded by vscode-cmake-tools, so I can't use the preset defined in cmakeuserpresets.json. Is there any option to open this feature? How can use the preset defined in cmakeuserpresets.json?

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

No response

v-ericawu commented 2 months ago

@gcampbell-msft We reproduced the issue using the following steps:

ENV:

Repro Steps:

  1. Download and unzip Test project.
  2. Open Test project with VS Code.
  3. Press F1 and run command 'CMake: Add Configure Preset', select 'Inherit from Configure Preset'.

Expected Result: Can add preset (both configure preset and build preset) for 'CMakeUserPresets.json' file.

Actual Result: preset (both configure preset and build preset) only adds to the CMakePresets.json file but not to the CMakeUserPresets.json file.

'CMake: Add Configure Preset'->'Inherit from Configure Preset': image

‘CMake: Add Build Preset’->'Create from Configure Preset': image

gcampbell-msft commented 2 months ago

@aiyolo Does the above reproduction match the issue that you are hitting? Is it only this use case that it is happening in? Or is there more general issues?

aiyolo commented 2 months ago

yes, it is the issue I'm hitting, I think it's a general issue.

benschreiber commented 1 month ago

Possibly related to #3636

v-ericawu commented 1 month ago

@gcampbell-msft @aiyolo @benschreiber Verified on CMake Tools v1.18.37(pre-release), this issue still repro: image