vscode-cmake-tools icon indicating copy to clipboard operation
vscode-cmake-tools copied to clipboard

[Bug][Regression] The configure preset does not switch automatically in Project Status window after "CMake: Quick Start" command

Open Amy-Li03 opened this issue 8 months ago • 0 comments

Brief Issue Summary

Environment:

VS Code 1.99.2+ CMake Tools v1.21.15 (pre-release)

More info:

  1. Repro on Windows, Linux, Mac
  2. It doesn't repro on v1.20.17 and starts repro from v1.20.18 to latest v1.21.15, so this is a regression issue

Repro steps:

  1. Create a folder and open it with VS Code
  2. Create project using command CMake: Quick Start
  3. Click the CMake icon in the navigation bar
  4. Observe the value under Configure in Project Status Image

Expected Result:

The configure preset should switch automatically Image

Actual Result:

The configure preset does not switch automatically, and it will switch after reload project Image

CMake Tools Diagnostics

{
  "os": "win32",
  "vscodeVersion": "1.99.2",
  "cmtVersion": "1.21.15",
  "configurations": [
    {
      "folder": "c:\\Users\\v-amyli3\\Desktop\\Bi-weekly-app\\test2",
      "cmakeVersion": "3.30.5",
      "configured": true,
      "generator": "Ninja",
      "usesPresets": false,
      "compilers": {
        "C": "C:/msys64/ucrt64/bin/cc.exe",
        "CXX": "C:/msys64/ucrt64/bin/c++.exe"
      }
    }
  ],
  "cpptoolsIntegration": {
    "isReady": true,
    "hasCodeModel": true,
    "activeBuildType": "Debug",
    "buildTypesSeen": [
      "Debug"
    ],
    "requests": [],
    "responses": [],
    "partialMatches": [],
    "targetCount": 1,
    "executablesCount": 1,
    "librariesCount": 0,
    "targets": [
      {
        "name": "Helloworld",
        "type": "EXECUTABLE"
      }
    ]
  },
  "settings": [
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": true
    }
  ]
}

Debug Log

[proc] Executing command: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --version
[proc] Executing command: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E capabilities
[main] Safe constructing new CMakeProject instance
[variant] Constructing VariantManager
[main] Constructing new CMakeProject instance
[main] Starting CMake Tools second-phase init
[expand] expanded ${workspaceFolder}
[kit] Reading kits file C:\Users\v-amyli3\AppData\Local\CMakeTools\cmake-tools-kits.json
[kit] Successfully loaded 19 kits from C:\Users\v-amyli3\AppData\Local\CMakeTools\cmake-tools-kits.json
[kit] Not reading non-existent kits file: c:\Users\v-amyli3\Desktop\Bi-weekly-app\test2\.vscode\cmake-kits.json
[variant] Loaded new set of variants
[main] CMakeProject instance initialization complete.
[extension] [2336] cmake.quickStart started
[main] Injecting new Kit into CMake driver
[main] Starting new CMake driver
[main] Starting CMake driver
[cmakefileapi-driver] Creating instance of CMakeFileApiDriver
[driver] Initializing base driver using kit
[driver] CMakeDriver Kit set to __unspec__
[kit] The environment for kit '__unspec__': {
  "ALLUSERSPROFILE": "C:\\ProgramData",
  "APPDATA": "C:\\Users\\v-amyli3\\AppData\\Roaming",
  "CHROME_CRASHPAD_PIPE_NAME": "\\\\.\\pipe\\crashpad_11636_BDFPQNUNMRQOMPIN",
  "CLIENTNAME": "DESKTOP-4AMU057",
  "COMPUTERNAME": "CPC-vamyl-W9UOR",
  "ChocolateyInstall": "C:\\ProgramData\\chocolatey",
  "ChocolateyLastPathUpdate": "133823496213910293",
  "ComSpec": "C:\\Windows\\system32\\cmd.exe",
  "CommonProgramFiles": "C:\\Program Files\\Common Files",
  "CommonProgramFiles(x86)": "C:\\Program Files (x86)\\Common Files",
  "CommonProgramW6432": "C:\\Program Files\\Common Files",
  "DriverData": "C:\\Windows\\System32\\Drivers\\DriverData",
  "EFC_12152": "1",
  "ELECTRON_RUN_AS_NODE": "1",
  "HOMEDRIVE": "C:",
  "HOMEPATH": "\\Users\\v-amyli3",
  "IsDevBox": "True",
  "LOCALAPPDATA": "C:\\Users\\v-amyli3\\AppData\\Local",
  "LOGONSERVER": "\\\\CPC-vamyl-W9UOR",
  "NUMBER_OF_PROCESSORS": "16",
  "ORIGINAL_XDG_CURRENT_DESKTOP": "undefined",
  "OS": "Windows_NT",
  "OneDrive": "C:\\Users\\v-amyli3\\OneDrive - Microsoft",
  "OneDriveCommercial": "C:\\Users\\v-amyli3\\OneDrive - Microsoft",
  "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC",
  "PROCESSOR_ARCHITECTURE": "AMD64",
  "PROCESSOR_IDENTIFIER": "AMD64 Family 25 Model 1 Stepping 1, AuthenticAMD",
  "PROCESSOR_LEVEL": "25",
  "PROCESSOR_REVISION": "0101",
  "PSModulePath": "C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules",
  "PUBLIC": "C:\\Users\\Public",
  "Path": "C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Windows\\system32\\config\\systemprofile\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files\\Microsoft Dev Box Agent\\Scripts;C:\\Program Files\\Microsoft SQL Server\\150\\Tools\\Binn\\;C:\\Program Files (x86)\\Windows Kits\\10\\Windows Performance Toolkit\\;C:\\msys64\\ucrt64\\bin;C:\\ProgramData\\chocolatey\\bin;C:\\msys64\\usr\\bin;C:\\Program Files\\Git\\cmd;C:\\Users\\v-amyli3\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\v-amyli3\\AppData\\Local\\Programs\\Microsoft VS Code\\bin",
  "ProgramData": "C:\\ProgramData",
  "ProgramFiles": "C:\\Program Files",
  "ProgramFiles(x86)": "C:\\Program Files (x86)",
  "ProgramW6432": "C:\\Program Files",
  "SESSIONNAME": "rdp-sxs250105600#0",
  "SystemDrive": "C:",
  "SystemRoot": "C:\\Windows",
  "TEMP": "C:\\Users\\v-amyli3\\AppData\\Local\\Temp",
  "TMP": "C:\\Users\\v-amyli3\\AppData\\Local\\Temp",
  "UATDATA": "C:\\Windows\\CCM\\UATData\\D9F8C395-CAB8-491d-B8AC-179A1FE1BE77",
  "USERDNSDOMAIN": "redmond.corp.microsoft.com",
  "USERDOMAIN": "REDMOND",
  "USERDOMAIN_ROAMINGPROFILE": "REDMOND",
  "USERNAME": "v-amyli3",
  "USERPROFILE": "C:\\Users\\v-amyli3",
  "VSCODE_CODE_CACHE_PATH": "C:\\Users\\v-amyli3\\AppData\\Roaming\\Code\\CachedData\\4949701c880d4bdb949e3c0e6b400288da7f474b",
  "VSCODE_CRASH_REPORTER_PROCESS_TYPE": "extensionHost",
  "VSCODE_CWD": "C:\\Users\\v-amyli3\\AppData\\Local\\Programs\\Microsoft VS Code",
  "VSCODE_ESM_ENTRYPOINT": "vs/workbench/api/node/extensionHostProcess",
  "VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
  "VSCODE_IPC_HOOK": "\\\\.\\pipe\\67ed9be6-1.99.2-main-sock",
  "VSCODE_NLS_CONFIG": "{\"userLocale\":\"en\",\"osLocale\":\"en-us\",\"resolvedLanguage\":\"en\",\"defaultMessagesFile\":\"C:\\\\Users\\\\v-amyli3\\\\AppData\\\\Local\\\\Programs\\\\Microsoft VS Code\\\\resources\\\\app\\\\out\\\\nls.messages.json\",\"locale\":\"en\",\"availableLanguages\":{}}",
  "VSCODE_PID": "11636",
  "WVD_AGENT_CLUSTER": "CUSR1C222",
  "WVD_AGENT_RING": "R1",
  "WVD_MONITORING_CONFIG_VERSION": "1.9999",
  "WVD_MONITORING_DATA_DIRECTORY": "C:\\Windows\\system32\\config\\systemprofile\\AppData\\Roaming\\Microsoft\\Monitoring",
  "WVD_MONITORING_ENV": "PROD",
  "WVD_MONITORING_GCS_ACCOUNT": "RDSAgentProd",
  "WVD_MONITORING_GCS_AUTH_ID": "RDSAgentPROD.GENEVA.KEYVAULT.RDSAGENT.WVD",
  "WVD_MONITORING_GCS_AUTH_ID_TYPE": "AuthKeyVault",
  "WVD_MONITORING_GCS_CERTSTORE": "LOCAL_MACHINE\\MY",
  "WVD_MONITORING_GCS_ENVIRONMENT": "Diagnostics Prod",
  "WVD_MONITORING_GCS_NAMESPACE": "RDSAgentProd",
  "WVD_MONITORING_GCS_REGION": "westus2",
  "WVD_MONITORING_MDM_ACCOUNT": "RDSAgentProd",
  "WVD_MONITORING_RESOURCE": "6bdff336-9a7e-4dd2-a161-247921833a36",
  "WVD_MONITORING_ROLE": "f330d97ff026408393884f97ea993f79",
  "WVD_MONITORING_ROLE_INSTANCE": "CPC-vamyl-W9UOR",
  "WVD_MONITORING_TENANT": "PROD",
  "windir": "C:\\Windows"
}
[driver] Trying to detect generator supported by system
[expand] expanded ${workspaceFolder}/build
[driver] Setting new variant Debug
[expand] expanded ${workspaceFolder}/build
[main] [Quick Start] CmakeLists.txt created successfully.
[presetController] Start selection of configure presets. Found 0 presets.
[presetController] Opening configure preset selection QuickPick
[presetController] Reading presets file C:\Users\v-amyli3\Desktop\Bi-weekly-app\test2\CMakePresets.json
[presetController] Reading and validating the presets file "C:\Users\v-amyli3\Desktop\Bi-weekly-app\test2\CMakePresets.json"
[presetController] Reading presets file C:\Users\v-amyli3\Desktop\Bi-weekly-app\test2\CMakePresets.json
[presetController] Reading and validating the presets file "C:\Users\v-amyli3\Desktop\Bi-weekly-app\test2\CMakePresets.json"
[presetController] Successfully validated C:\Users\v-amyli3\Desktop\Bi-weekly-app\test2\CMakePresets.json against presets schema
[presetController] Expanding presets file C:\Users\v-amyli3\Desktop\Bi-weekly-app\test2\CMakePresets.json
[expand] expanded ${sourceDir}/out/build/${presetName}
[expand] expanded ${sourceDir}/out/install/${presetName}
[presetController] Successfully expanded presets file C:\Users\v-amyli3\Desktop\Bi-weekly-app\test2\CMakePresets.json
[presetController] Successfully validated C:\Users\v-amyli3\Desktop\Bi-weekly-app\test2\CMakePresets.json against presets schema
[presetController] Expanding presets file C:\Users\v-amyli3\Desktop\Bi-weekly-app\test2\CMakePresets.json
[expand] expanded ${sourceDir}/out/build/${presetName}
[expand] expanded ${sourceDir}/out/install/${presetName}
[presetController] Successfully expanded presets file C:\Users\v-amyli3\Desktop\Bi-weekly-app\test2\CMakePresets.json
[presetController] User selected configure preset "MyPresets"
[main] Resolving the selected configure preset
[expand] expanded ${sourceDir}/out/build/${presetName}
[expand] expanded ${sourceDir}/out/install/${presetName}
[main] Loading new configure preset into CMake driver
[driver] Switching to configure preset: MyPresets
[driver] CMakeDriver configure preset set to MyPresets
[main] Resolving the selected build preset
[main] Loading new build preset into CMake driver
[driver] Switching to build preset: __defaultBuildPreset__
[driver] CMakeDriver build preset set to __defaultBuildPreset__
[main] Resolving the selected test preset
[main] Resolving the selected test preset
[main] Loading new test preset into CMake driver
[driver] Switching to test preset: __defaultTestPreset__
[driver] CMakeDriver test preset set to __defaultTestPreset__
[main] Resolving the selected package preset
[main] Resolving the selected package preset
[main] Loading new package preset into CMake driver
[driver] Switching to package preset: __defaultPackagePreset__
[driver] CMakeDriver package preset set to __defaultPackagePreset__
[main] Resolving the selected workflow preset
[main] Resolving the selected workflow preset
[expand] expanded ${sourceDir}/out/build/${presetName}
[expand] expanded ${sourceDir}/out/install/${presetName}
[main] Loading new workflow preset into CMake driver
[driver] Switching to workflow preset: __defaultWorkflowPreset__
[driver] CMakeDriver workflow preset set to __defaultWorkflowPreset__
[main] [Quick Start] CMakePresets.json created successfully.
[main] Configuring project: test2 
[main] Saving open files before configure/build
[expand] expanded ${workspaceFolder}/build
[driver] Start configure 
[driver] Running pre-configure checks and steps
[expand] expanded ${workspaceFolder}/build
[cmakefileapi-driver] Configuring using kit
[cmakefileapi-driver] Invoking CMake C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe with arguments ["-DCMAKE_BUILD_TYPE:STRING=Debug","-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE","--no-warn-unused-cli","-S","C:/Users/v-amyli3/Desktop/Bi-weekly-app/test2","-B","c:/Users/v-amyli3/Desktop/Bi-weekly-app/test2/build","-G","Ninja"]
[proc] Executing command: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE --no-warn-unused-cli -S C:/Users/v-amyli3/Desktop/Bi-weekly-app/test2 -B c:/Users/v-amyli3/Desktop/Bi-weekly-app/test2/build -G Ninja
[proc]   with environment: {"ALLUSERSPROFILE":"C:\\ProgramData","APPDATA":"C:\\Users\\v-amyli3\\AppData\\Roaming","CHROME_CRASHPAD_PIPE_NAME":"\\\\.\\pipe\\crashpad_11636_BDFPQNUNMRQOMPIN","CLIENTNAME":"DESKTOP-4AMU057","COMPUTERNAME":"CPC-vamyl-W9UOR","ChocolateyInstall":"C:\\ProgramData\\chocolatey","ChocolateyLastPathUpdate":"133823496213910293","ComSpec":"C:\\Windows\\system32\\cmd.exe","CommonProgramFiles":"C:\\Program Files\\Common Files","CommonProgramFiles(x86)":"C:\\Program Files (x86)\\Common Files","CommonProgramW6432":"C:\\Program Files\\Common Files","DriverData":"C:\\Windows\\System32\\Drivers\\DriverData","EFC_12152":"1","ELECTRON_RUN_AS_NODE":"1","HOMEDRIVE":"C:","HOMEPATH":"\\Users\\v-amyli3","IsDevBox":"True","LOCALAPPDATA":"C:\\Users\\v-amyli3\\AppData\\Local","LOGONSERVER":"\\\\CPC-vamyl-W9UOR","NUMBER_OF_PROCESSORS":"16","ORIGINAL_XDG_CURRENT_DESKTOP":"undefined","OS":"Windows_NT","OneDrive":"C:\\Users\\v-amyli3\\OneDrive - Microsoft","OneDriveCommercial":"C:\\Users\\v-amyli3\\OneDrive - Microsoft","PATHEXT":".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC","PROCESSOR_ARCHITECTURE":"AMD64","PROCESSOR_IDENTIFIER":"AMD64 Family 25 Model 1 Stepping 1, AuthenticAMD","PROCESSOR_LEVEL":"25","PROCESSOR_REVISION":"0101","PSModulePath":"C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules","PUBLIC":"C:\\Users\\Public","Path":"C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Windows\\system32\\config\\systemprofile\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files\\Microsoft Dev Box Agent\\Scripts;C:\\Program Files\\Microsoft SQL Server\\150\\Tools\\Binn\\;C:\\Program Files (x86)\\Windows Kits\\10\\Windows Performance Toolkit\\;C:\\msys64\\ucrt64\\bin;C:\\ProgramData\\chocolatey\\bin;C:\\msys64\\usr\\bin;C:\\Program Files\\Git\\cmd;C:\\Users\\v-amyli3\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\v-amyli3\\AppData\\Local\\Programs\\Microsoft VS Code\\bin","ProgramData":"C:\\ProgramData","ProgramFiles":"C:\\Program Files","ProgramFiles(x86)":"C:\\Program Files (x86)","ProgramW6432":"C:\\Program Files","SESSIONNAME":"rdp-sxs250105600#0","SystemDrive":"C:","SystemRoot":"C:\\Windows","TEMP":"C:\\Users\\v-amyli3\\AppData\\Local\\Temp","TMP":"C:\\Users\\v-amyli3\\AppData\\Local\\Temp","UATDATA":"C:\\Windows\\CCM\\UATData\\D9F8C395-CAB8-491d-B8AC-179A1FE1BE77","USERDNSDOMAIN":"redmond.corp.microsoft.com","USERDOMAIN":"REDMOND","USERDOMAIN_ROAMINGPROFILE":"REDMOND","USERNAME":"v-amyli3","USERPROFILE":"C:\\Users\\v-amyli3","VSCODE_CODE_CACHE_PATH":"C:\\Users\\v-amyli3\\AppData\\Roaming\\Code\\CachedData\\4949701c880d4bdb949e3c0e6b400288da7f474b","VSCODE_CRASH_REPORTER_PROCESS_TYPE":"extensionHost","VSCODE_CWD":"C:\\Users\\v-amyli3\\AppData\\Local\\Programs\\Microsoft VS Code","VSCODE_ESM_ENTRYPOINT":"vs/workbench/api/node/extensionHostProcess","VSCODE_HANDLES_UNCAUGHT_ERRORS":"true","VSCODE_IPC_HOOK":"\\\\.\\pipe\\67ed9be6-1.99.2-main-sock","VSCODE_L10N_BUNDLE_LOCATION":"","VSCODE_NLS_CONFIG":"{\"userLocale\":\"en\",\"osLocale\":\"en-us\",\"resolvedLanguage\":\"en\",\"defaultMessagesFile\":\"C:\\\\Users\\\\v-amyli3\\\\AppData\\\\Local\\\\Programs\\\\Microsoft VS Code\\\\resources\\\\app\\\\out\\\\nls.messages.json\",\"locale\":\"en\",\"availableLanguages\":{}}","VSCODE_PID":"11636","WVD_AGENT_CLUSTER":"CUSR1C222","WVD_AGENT_RING":"R1","WVD_MONITORING_CONFIG_VERSION":"1.9999","WVD_MONITORING_DATA_DIRECTORY":"C:\\Windows\\system32\\config\\systemprofile\\AppData\\Roaming\\Microsoft\\Monitoring","WVD_MONITORING_ENV":"PROD","WVD_MONITORING_GCS_ACCOUNT":"RDSAgentProd","WVD_MONITORING_GCS_AUTH_ID":"RDSAgentPROD.GENEVA.KEYVAULT.RDSAGENT.WVD","WVD_MONITORING_GCS_AUTH_ID_TYPE":"AuthKeyVault","WVD_MONITORING_GCS_CERTSTORE":"LOCAL_MACHINE\\MY","WVD_MONITORING_GCS_ENVIRONMENT":"Diagnostics Prod","WVD_MONITORING_GCS_NAMESPACE":"RDSAgentProd","WVD_MONITORING_GCS_REGION":"westus2","WVD_MONITORING_MDM_ACCOUNT":"RDSAgentProd","WVD_MONITORING_RESOURCE":"6bdff336-9a7e-4dd2-a161-247921833a36","WVD_MONITORING_ROLE":"f330d97ff026408393884f97ea993f79","WVD_MONITORING_ROLE_INSTANCE":"CPC-vamyl-W9UOR","WVD_MONITORING_TENANT":"PROD","windir":"C:\\Windows"}
[cmake] Not searching for unused variables given on the command line.
[cache] Reading CMake cache file c:/Users/v-amyli3/Desktop/Bi-weekly-app/test2/build/CMakeCache.txt
[cache] Cache file does not exist: Returning empty cache data
[cmake] -- The C compiler identification is GNU 14.1.0
[cmake] -- The CXX compiler identification is GNU 14.1.0
[cmake] -- Detecting C compiler ABI info
[cmake] -- Detecting C compiler ABI info - done
[cmake] -- Check for working C compiler: C:/msys64/ucrt64/bin/cc.exe - skipped
[cmake] -- Detecting C compile features
[cmake] -- Detecting C compile features - done
[cmake] -- Detecting CXX compiler ABI info
[cmake] -- Detecting CXX compiler ABI info - done
[cmake] -- Check for working CXX compiler: C:/msys64/ucrt64/bin/c++.exe - skipped
[cmake] -- Detecting CXX compile features
[cmake] -- Detecting CXX compile features - done
[cmake] -- Configuring done (3.4s)
[cmake] -- Generating done (0.2s)
[cmake] -- Build files have been written to: C:/Users/v-amyli3/Desktop/Bi-weekly-app/test2/build
[cmakefileapi-parser] Read reply folder: c:\Users\v-amyli3\Desktop\Bi-weekly-app\test2\build\.cmake\api\v1\reply
[cmakefileapi-parser] Found index files: ["cache-v2-a9062156438f5b045ef9.json","cmakeFiles-v1-5ecc1af9ba60c0df898d.json","codemodel-v2-31a6f356f72e92411f7a.json","directory-.-Debug-d0094a50bb2071803777.json","index-2025-04-17T02-26-01-0612.json","target-Helloworld-Debug-46e3cf9b721855f21d27.json","toolchains-v1-ff148978d998e9a483b2.json"]
[cache] Reading CMake cache file c:/Users/v-amyli3/Desktop/Bi-weekly-app/test2/build/CMakeCache.txt
[cache] Parsing CMake cache string
[extension] [2336] cmake.quickStart finished (returned 0)

Additional Information

No response

Amy-Li03 avatar Apr 17 '25 02:04 Amy-Li03