Skip to content

[Bug] launch:program '${cmake.testProgram}' does not exist #4574

@AndreRicardo-Zoetis

Description

@AndreRicardo-Zoetis

Brief Issue Summary

ctest debug no longer works when I click from Debug > Run and Debug, just states "launch:program '${cmake.testProgram}' does not exist"

Image

launch.json

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        { // From https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/debug-launch.md#gdb-1
            "name": "(ctest) Launch",
            "type": "cppdbg",
            "request": "launch",
            // Resolved by CMake Tools:
            "cwd": "${cmake.testWorkingDirectory}",
            "program": "${cmake.testProgram}",
            "args": [ "${cmake.testArgs}"],
        }
    ]
}

settings.json

{
    "cmake.debugConfig": {
        "args": ["-l0","-e", "h"]
    },
    "cmake.buildDirectory": "${workspaceFolder}/out",
    "cmake.cmakePath": "/tmp/deviceupdate-cmake/bin/cmake",
    "cmake.cpackPath": "/tmp/deviceupdate-cmake/bin/cpack",
    "cmake.ctestPath": "/tmp/deviceupdate-cmake/bin/ctest",
    "cmake.loggingLevel": "debug"
}

CMake Tools Diagnostics

{
  "os": "linux",
  "vscodeVersion": "1.104.1",
  "cmtVersion": "1.21.36",
  "configurations": [
    {
      "folder": "/workspaces/iot-hub-device-update",
      "cmakeVersion": "3.23.2",
      "configured": true,
      "generator": "Ninja",
      "usesPresets": false,
      "compilers": {
        "C": "/usr/bin/gcc",
        "CXX": "/usr/bin/g++"
      }
    }
  ],
  "cpptoolsIntegration": {
    "isReady": true,
    "hasCodeModel": true,
    "activeBuildType": "Debug",
    "buildTypesSeen": [
      "Debug"
    ],
    "requests": [
      "file:///workspaces/iot-hub-device-update/src/utils/workflow_utils/tests/workflow_utils_ut.cpp"
    ],
    "responses": [],
    "partialMatches": [],
    "targetCount": 93,
    "executablesCount": 2,
    "librariesCount": 63,
    "targets": []
  },
  "settings": [
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": true
    }
  ]
}

Debug Log

[main] Building folder: /workspaces/iot-hub-device-update/out 
[main] Saving open files before configure/build
[build] Starting build
[driver] Start build all
[proc] Executing command: /tmp/deviceupdate-cmake/bin/cmake --build /workspaces/iot-hub-device-update/out --config Debug --target all --
[proc]   with environment: {"HOSTNAME":"3cc60b8b140d","HOME":"/home/vscode","PATH":"/vscode/vscode-server/bin/linux-x64/0f0d87fa9e96c856c5212fc86db137ac0d783365/bin/remote-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/vscode/.local/bin","SHELL":"/bin/bash","PWD":"/vscode/vscode-server/bin/linux-x64/0f0d87fa9e96c856c5212fc86db137ac0d783365","VSCODE_CWD":"/vscode/vscode-server/bin/linux-x64/0f0d87fa9e96c856c5212fc86db137ac0d783365","VSCODE_NLS_CONFIG":"{\"userLocale\":\"en\",\"osLocale\":\"en\",\"resolvedLanguage\":\"en\",\"defaultMessagesFile\":\"/vscode/vscode-server/bin/linux-x64/0f0d87fa9e96c856c5212fc86db137ac0d783365/out/nls.messages.json\",\"locale\":\"en\",\"availableLanguages\":{}}","VSCODE_HANDLES_SIGPIPE":"true","VSCODE_ESM_ENTRYPOINT":"vs/workbench/api/node/extensionHostProcess","VSCODE_HANDLES_UNCAUGHT_ERRORS":"true","REMOTE_CONTAINERS_IPC":"/tmp/vscode-remote-containers-ipc-f5edd349-ab49-44d0-81cc-403b4037dc99.sock","LS_COLORS":"","REMOTE_CONTAINERS_SOCKETS":"[\"/tmp/vscode-ssh-auth-f5edd349-ab49-44d0-81cc-403b4037dc99.sock\",\"/tmp/.X11-unix/X5\",\"/home/vscode/.gnupg/S.gpg-agent\"]","USER":"vscode","SHLVL":"1","PROMPT_DIRTRIM":"4","_":"/bin/cat","SSH_AUTH_SOCK":"/tmp/vscode-ssh-auth-f5edd349-ab49-44d0-81cc-403b4037dc99.sock","DISPLAY":":5","REMOTE_CONTAINERS_DISPLAY_SOCK":"/tmp/.X11-unix/X5","REMOTE_CONTAINERS":"true","BROWSER":"/vscode/vscode-server/bin/linux-x64/0f0d87fa9e96c856c5212fc86db137ac0d783365/bin/helpers/browser.sh","ELECTRON_RUN_AS_NODE":"1","VSCODE_IPC_HOOK_CLI":"/tmp/vscode-ipc-b626f353-4bbf-4342-8f78-7aa45763d6e2.sock","VSCODE_L10N_BUNDLE_LOCATION":"","APPLICATION_INSIGHTS_NO_STATSBEAT":"true","NINJA_STATUS":"[%s/%t %p :: %e] "}
[build] ninja: no work to do.
[driver] Build completed: 00:00:00.029
[cmakefileapi-parser] Read reply folder: /workspaces/iot-hub-device-update/out/.cmake/api/v1/reply
[cmakefileapi-parser] Found index files: ["cache-v2-03971b698f03b73c2820.json","cmakeFiles-v1-3cc9b643bd55ab018470.json","codemodel-v2-7d4a7027335ae99a1ac2.json","directory-.-Debug-f5ebdc15457944623624.json","directory-daemon-Debug-a8788f423dcbf5060187.json","directory-src-Debug-b6cf2213fc5053b67c22.json","directory-src.adu-shell-Debug-42fb4ec8f8ca29682afd.json","directory-src.adu-shell.scripts-Debug-3d96f6503a02abfb6aa9.json","directory-src.adu_types-Debug-2a256f6cc218128e4a7c.json","directory-src.adu_workflow-Debug-2be099d32ccd84923673.json","directory-src.agent-Debug-7e8437a387570da9aec8.json","directory-src.agent.adu_core_export_helpers-Debug-ee53343fc3ca127ae65c.json","directory-src.agent.adu_core_interface-Debug-bd3133ddeafb76e79201.json","directory-src.agent.command_helper-Debug-6bed7058ff3dbe736046.json","directory-src.agent.device_info_interface-Debug-21136fc35d7307a985e5.json","directory-src.agent.pnp_helper-Debug-8d4f990be89f28e2c50a.json","directory-src.agent.shutdown_service-Debug-79be0cb95578e3bfe8aa.json","directory-src.agent_orchestration-Debug-7983b09ba5478a2962dc.json","directory-src.communication_abstraction-Debug-48c11601bd7bb39fb4ff.json","directory-src.communication_managers-Debug-5f9771112a61afd6f962.json","directory-src.communication_managers.iothub_communication_manager-Debug-f5ae24cc283737ee41bd.json","directory-src.diagnostics_component-Debug-b885fe29c7b1efc896f2.json","directory-src.diagnostics_component.diagnostics_async_helper-Debug-2a076b877295170ad45b.json","directory-src.diagnostics_component.diagnostics_devicename-Debug-de48146fdac1ec6a6bc0.json","directory-src.diagnostics_component.diagnostics_interface-Debug-ddbed917a46bc94b7f77.json","directory-src.diagnostics_component.diagnostics_workflow-Debug-2aa4758582e4497b1f47.json","directory-src.diagnostics_component.utils-Debug-67e884fdcc64d146fcef.json","directory-src.diagnostics_component.utils.config_utils-Debug-19a01e0a9200515c7a7c.json","directory-src.diagnostics_component.utils.file_info_utils-Debug-4ed46ef229e4bee89de2.json","directory-src.diagnostics_component.utils.file_upload_utils-Debug-525b2d75d06b91ff1d70.json","directory-src.diagnostics_component.utils.operation_id_utils-Debug-0ad30586728c79c59473.json","directory-src.extensions-Debug-2cb3ad4aea608219a8f0.json","directory-src.extensions.component_enumerators.examples.contoso_component_enumerator-Debug-c13fbae711acea339ee6.json","directory-src.extensions.content_downloaders-Debug-54f657a6ff80f54a828c.json","directory-src.extensions.content_downloaders.curl_downloader-Debug-841b138d4bf0be9e15e0.json","directory-src.extensions.content_downloaders.deliveryoptimization_downloader-Debug-fb3831d7abb2705206b8.json","directory-src.extensions.download_handlers-Debug-063b779f4825238f6a75.json","directory-src.extensions.download_handlers.download_handler_factory-Debug-817ab0d96922a26aa656.json","directory-src.extensions.download_handlers.download_handler_plugin-Debug-98014416acf48519bbec.json","directory-src.extensions.download_handlers.plugin_examples-Debug-3519579646dd7f0de86c.json","directory-src.extensions.download_handlers.plugin_examples.microsoft_delta_download_handler-Debug-1dca8645ef0bd8104535.json","directory-src.extensions.download_handlers.plugin_examples.microsoft_delta_download_handler.handler-Debug-bc689b7f7ff80c8ec738.json","directory-src.extensions.download_handlers.plugin_examples.microsoft_delta_download_handler.handler.lib-Debug-2f286a99a13dfc4dacec.json","directory-src.extensions.download_handlers.plugin_examples.microsoft_delta_download_handler.handler.plugin-Debug-866e5dfb2b75d6707bf3.json","directory-src.extensions.download_handlers.plugin_examples.microsoft_delta_download_handler.handler.utils-Debug-b19c3c1cb47321389574.json","directory-src.extensions.download_handlers.plugin_examples.microsoft_delta_download_handler.source_update_cache-Debug-610381073f4bbc2859f9.json","directory-src.extensions.extension_manager-Debug-fb70b5f710d32131dff4.json","directory-src.extensions.shared_lib-Debug-c0e713b65e9583cc4dc9.json","directory-src.extensions.step_handlers-Debug-f07a19a22ad6f5152db8.json","directory-src.extensions.step_handlers.apt_handler-Debug-c382600e02935338dcbb.json","directory-src.extensions.step_handlers.script_handler-Debug-2bb815ee774a4b542247.json","directory-src.extensions.step_handlers.simulator_handler-Debug-0cd7759bd997baa56320.json","directory-src.extensions.step_handlers.swupdate_handler_v2-Debug-e8d2feeaa7a1e4b4fefc.json","directory-src.extensions.update_manifest_handlers-Debug-8c932c00025435fae126.json","directory-src.extensions.update_manifest_handlers.steps_handler-Debug-819af42ebf631c523d1b.json","directory-src.libaducpal-Debug-18167d000c5b180a0ca9.json","directory-src.logging-Debug-94667c5b64d02805c982.json","directory-src.logging.zlog-Debug-dbb6f6d3293da4442ed3.json","directory-src.platform_layers-Debug-e2f3b9afe8852ce283c0.json","directory-src.platform_layers.linux_platform_layer-Debug-323263d7fd49094a927c.json","directory-src.rootkey_workflow-Debug-ca409aec2d42730960d4.json","directory-src.utils-Debug-3e06762d87894fb62125.json","directory-src.utils.auto_utils-Debug-127706123fb6298ee4bb.json","directory-src.utils.c_utils-Debug-e4254ff9c55ab267db3f.json","directory-src.utils.config_utils-Debug-a16880ff487dec1d906c.json","directory-src.utils.contract_utils-Debug-612cf02dd8edd2cd7dc2.json","directory-src.utils.crypto_utils-Debug-f2d27ac714e8a0e72f36.json","directory-src.utils.d2c_messaging-Debug-24f902c86944a8cbfab5.json","directory-src.utils.eis_utils-Debug-44435eeacc753600a159.json","directory-src.utils.entity_utils-Debug-26575d59902480842f17.json","directory-src.utils.exception_utils-Debug-cede4d4238989aeb14c2.json","directory-src.utils.extension_utils-Debug-dc5f7bd5c7b9259800cf.json","directory-src.utils.file_utils-Debug-2f26aa67d38d70f28b84.json","directory-src.utils.hash_utils-Debug-6ea40c8de851d9974fb2.json","directory-src.utils.installed_criteria_utils-Debug-fd6431a1adf240655974.json","directory-src.utils.jws_utils-Debug-80aa96d9dca386608c38.json","directory-src.utils.parser_utils-Debug-f81ca1b6de08a6bcc65d.json","directory-src.utils.parson_json_utils-Debug-1de88b8ea1401394839e.json","directory-src.utils.path_utils-Debug-30ab3fa3a96b92906cf2.json","directory-src.utils.permission_utils-Debug-46ac725609d0088ce427.json","directory-src.utils.process_utils-Debug-592203b882050bc66737.json","directory-src.utils.reporting_utils-Debug-870eeab9ccefb9ca33e9.json","directory-src.utils.retry_utils-Debug-081e2760581c1c80c409.json","directory-src.utils.root_key_utils-Debug-660b7b810ac686652ff4.json","directory-src.utils.rootkeypackage_utils-Debug-6aabeba8e0a787394b5c.json","directory-src.utils.string_utils-Debug-034e1796fe328c418daf.json","directory-src.utils.system_utils-Debug-28cb0ff209a1d23fb56c.json","directory-src.utils.url_utils-Debug-c0eae895ed7495a2ebcd.json","directory-src.utils.workflow_data_utils-Debug-806404f51a01f09e0b24.json","directory-src.utils.workflow_utils-Debug-32fd3b7aa1ce02cbdfc7.json","index-2025-09-19T10-03-10-0372.json","target-AducIotAgent-Debug-5411869b2cd4766b488b.json","target-Continuous-Debug-58b5a0e75cc40c1339b4.json","target-ContinuousBuild-Debug-78427de64e7719a9b1dd.json","target-ContinuousConfigure-Debug-d7f04d07c1fd2ad241db.json","target-ContinuousCoverage-Debug-01307973a9088cd6dfca.json","target-ContinuousMemCheck-Debug-731580f6ddc645f33698.json","target-ContinuousStart-Debug-0dc4f942d1cf687cc1e2.json","target-ContinuousSubmit-Debug-b17bff7a9b0ac4244b21.json","target-ContinuousTest-Debug-8043f160dfcd3dee0537.json","target-ContinuousUpdate-Debug-644ff64849a4a8cd8367.json","target-Experimental-Debug-3e00ad7720f4aff12ba8.json","target-ExperimentalBuild-Debug-bf94b6dcd7348df33054.json","target-ExperimentalConfigure-Debug-580b020b763cd3e8b1f3.json","target-ExperimentalCoverage-Debug-6de28158bf9045cf0943.json","target-ExperimentalMemCheck-Debug-0e36db12f4a2cead9d40.json","target-ExperimentalStart-Debug-989fb4a210b588abf7b7.json","target-ExperimentalSubmit-Debug-393228ce21076b75e3de.json","target-ExperimentalTest-Debug-99c45c793ca0745ad0a3.json","target-ExperimentalUpdate-Debug-30d1173d9ad378db6536.json","target-Nightly-Debug-669e85666340dfc845d0.json","target-NightlyBuild-Debug-ed2923401e267b64e45d.json","target-NightlyConfigure-Debug-f81bb2ef6b30c63958a9.json","target-NightlyCoverage-Debug-169ebc678e0c06d9ee55.json","target-NightlyMemCheck-Debug-c451c3ef97058f73a169.json","target-NightlyMemoryCheck-Debug-81e8ab814232aa3d7f35.json","target-NightlyStart-Debug-8a018597ba421569c897.json","target-NightlySubmit-Debug-83a9a11bb37f782d1dce.json","target-NightlyTest-Debug-eb5a647cf5f2502ca7cf.json","target-NightlyUpdate-Debug-4dbbd4a40f0585bfc42d.json","target-adu-shell-Debug-66c5f04981b2a87ec1f2.json","target-adu_core_export_helpers-Debug-cb47fb317ed851036410.json","target-adu_core_interface-Debug-e7ff03d64060a085a935.json","target-adu_types-Debug-e86eee40bd1f1af82ada.json","target-agent_orchestration-Debug-421ea94d3553972b38ab.json","target-agent_workflow-Debug-a4fa60d1e08865c19090.json","target-c_utils-Debug-77ba78d563cdb7e82549.json","target-command_helper-Debug-70bf593c513f256a7c61.json","target-communication_abstraction-Debug-6e36a2ba694ac6bb17c4.json","target-config_utils-Debug-1502ac88e7089a32c080.json","target-contoso_component_enumerator-Debug-a81871a1749912971d0f.json","target-contract_utils-Debug-a3c5c6357d77c0294170.json","target-crypto_utils-Debug-0d15ea4af8936ba2630c.json","target-curl_content_downloader-Debug-3f4bee2371585b92dd8f.json","target-d2c_messaging-Debug-9097e648c6364602a195.json","target-deliveryoptimization_content_downloader-Debug-ae18b3c9fc57e4e62e3d.json","target-device_info_interface-Debug-62e3a74023cc5c1fa1ed.json","target-diagnostics_async_helper-Debug-1557bcc1a08993be16d6.json","target-diagnostics_config_utils-Debug-0fadba29045e478a4f32.json","target-diagnostics_devicename-Debug-f3d4ee611caff428025c.json","target-diagnostics_interface-Debug-9e373a494452f43a44d9.json","target-diagnostics_workflow-Debug-05c68c9373378d8a3a25.json","target-download_handler_factory-Debug-abd69149bd2139e672bc.json","target-download_handler_plugin-Debug-d50288d6981fd6557380.json","target-eis_utils-Debug-bed857c1c154faf47723.json","target-extension_manager-Debug-1b43cca05fcb61db93ec.json","target-extension_utils-Debug-44bb02ccead48b2b70d7.json","target-file_info_utils-Debug-f7e1e73902c12bfa6601.json","target-file_upload_utility-Debug-22b51f3f0ff80c4d28c8.json","target-file_utils-Debug-b5aef9c4b2a6b11d052c.json","target-hash_utils-Debug-7193e953645d59ddb896.json","target-installed_criteria_utils-Debug-de8ab39a120bdd1f34de.json","target-iothub_communication_manager-Debug-ac566264e83adf0429f1.json","target-jws_utils-Debug-4fff6791d71bba58ecfe.json","target-linux_platform_layer-Debug-19d61fbe1c6a0a45cc83.json","target-microsoft-delta-download-handler-Debug-da28ae29417a558cbefb.json","target-microsoft_apt_1-Debug-f06451f166979cf37b5f.json","target-microsoft_delta_download_handler-Debug-47f49939a2cee9d8bac7.json","target-microsoft_delta_download_handler_utils-Debug-ab31aa19c6a68485f7bc.json","target-microsoft_script_1-Debug-ee6152bf8256b940abbb.json","target-microsoft_simulator_1-Debug-c0312127640d112dc53a.json","target-microsoft_steps_1-Debug-533021c040adbe40e304.json","target-microsoft_swupdate_2-Debug-5cc3a21a181ff2a2b107.json","target-operation_id_utils-Debug-61de28764195f0f3a4fb.json","target-parser_utils-Debug-3cd12ceca937a80f2dd2.json","target-parson_json_utils-Debug-50dde3bece5a1638564e.json","target-path_utils-Debug-ea9282f93ad3c6180819.json","target-permission_utils-Debug-6f6d3deffdfb051b152d.json","target-pnp_helper-Debug-c8f901f9bd534a61658a.json","target-process_utils-Debug-9e427ab11195e9aeba63.json","target-reporting_utils-Debug-4ff2261161da1c484c9f.json","target-retry_utils-Debug-fa95897e33e694daa479.json","target-root_key_utils-Debug-e7023b6a87386c4ec303.json","target-rootkey_workflow-Debug-ecb55181e9e86b8d48a3.json","target-rootkeypackage_utils-Debug-123f8f281c67d2dd1be3.json","target-shared_lib-Debug-77357cf354520e199e70.json","target-shutdown_service-Debug-e7f56e8732744b19ce68.json","target-source_update_cache-Debug-37c85bc0a1c1e064d16c.json","target-string_utils-Debug-bf57b58f097dadcaf3ea.json","target-system_utils-Debug-e0969baa093df2627360.json","target-url_utils-Debug-928bc6dd0debd86921e5.json","target-workflow_data_utils-Debug-9c9520a215afab652f42.json","target-workflow_utils-Debug-20d14cf48e2c9a69ac86.json","target-zlog-Debug-9586b1f5ab614452311c.json","toolchains-v1-ba4fd309bbbd4b822c54.json"]
[expand] expanded ${workspaceFolder}/out
[build] Build finished with exit code 0
[cache] Reading CMake cache file /workspaces/iot-hub-device-update/out/CMakeCache.txt
[cache] Parsing CMake cache string
[extension] [3873] cmake.build finished (returned 0)

Additional Information

I can debug in the Testing window.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    buga bug in the productmore info neededMore info is needed from the community for us to properly triage and investigate.

    Type

    No type

    Projects

    Status

    Blocked

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions