Skip to content
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

Unable to set build / debug / launch target #4219

Open
yszhou2019 opened this issue Dec 25, 2024 · 8 comments
Open

Unable to set build / debug / launch target #4219

yszhou2019 opened this issue Dec 25, 2024 · 8 comments
Labels
bug a bug in the product

Comments

@yszhou2019
Copy link

yszhou2019 commented Dec 25, 2024

Brief Issue Summary

Version info

VS code


Version: 1.96.2 (user setup)
Commit: fabdb6a30b49f79a7aba0f2ad9df9b399473380f
Date: 2024-12-19T10:22:47.216Z
OS: Windows_NT x64 10.0.19045

Remote server info

Linux amax 5.15.0-69-generic #76~20.04.1-Ubuntu SMP Mon Mar 20 15:54:19 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Extensions on remote server

I tried

  1. v1.15.31
  2. v1.18.42
  3. v1.19.52 (latest)

Short summary

After using vcpkg and presets.json, the original system using CMakeLists failed to work using extension buttons.

Previsouly I could choose the debug/launch/build target simply by selecting from a quick list for all targets CMake Tools is aware of that can be built. But now, all the version of extensions mentioned above failed to work.

A quick list is like image.

Issue list

The last 3 captures I attached are using "v1.19.52"

1st issue: now no matter the status bar button or the sidebar button, no one shows the target quick list!

Image

2nd issue: failed to debug even if I manually typed the target name and then click "debug"!

Failed to prepare executable target with name "undefined"

Image

3rd issue: nothing is shown after I click the "launch" even if I typed the target name! Nothing!

Image

CMake Tools Diagnostics

Debug Log

[main] Configuring project: cpp-feature-snippets 
[main] Saving open files before configure/build
[driver] Start configure 
[driver] Running pre-configure checks and steps
[cmakefileapi-driver] Configuring using preset
[cmakefileapi-driver] Invoking CMake /usr/local/bin/cmake with arguments ["-DCMAKE_TOOLCHAIN_FILE=/data0/shane/mine/vcpkg/scripts/buildsystems/vcpkg.cmake","-S/data0/shane/mine/workspace/talks-snippets/cpp-feature-snippets","-B/data0/shane/mine/workspace/talks-snippets/cpp-feature-snippets/build","-G","Ninja"]
[proc] Executing command: /usr/local/bin/cmake -DCMAKE_TOOLCHAIN_FILE=/data0/shane/mine/vcpkg/scripts/buildsystems/vcpkg.cmake -S/data0/shane/mine/workspace/talks-snippets/cpp-feature-snippets -B/data0/shane/mine/workspace/talks-snippets/cpp-feature-snippets/build -G Ninja
[proc]   with environment: {"USER":"shane","LC_TIME":"zh_CN.UTF-8","SSH_CLIENT":"10.100.150.206 13245 22","XDG_SESSION_TYPE":"tty","SHLVL":"0","HOME":"/home/shane","MOTD_SHOWN":"pam","OLDPWD":"/home/shane","LC_MONETARY":"zh_CN.UTF-8","SSL_CERT_FILE":"/usr/lib/ssl/certs/ca-certificates.crt","DBUS_SESSION_BUS_ADDRESS":"unix:path=/run/user/1015/bus","LOGNAME":"shane","_":"/data0/shane/.vscode-server/cli/servers/Stable-fabdb6a30b49f79a7aba0f2ad9df9b399473380f/server/node","XDG_SESSION_CLASS":"user","XDG_SESSION_ID":"78400","VSCODE_CLI_REQUIRE_TOKEN":"aeca6ce5-64b4-4085-a03d-4d85b78a4334","PATH":"/data0/shane/.vscode-server/cli/servers/Stable-fabdb6a30b49f79a7aba0f2ad9df9b399473380f/server/bin/remote-cli:/home/shane/miniconda3/envs/py310/bin:/home/shane/miniconda3/condabin:/home/shane/.local/bin:/data0/shane/opensource/clang+llvm-15.0.6-x86_64-linux-gnu-ubuntu-18.04/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/data0/shane/mine/vcpkg","VSCODE_AGENT_FOLDER":"/home/shane/.vscode-server","XDG_RUNTIME_DIR":"/run/user/1015","LC_ADDRESS":"zh_CN.UTF-8","SSL_CERT_DIR":"/usr/lib/ssl/certs","LANG":"en_US.UTF-8","LC_TELEPHONE":"zh_CN.UTF-8","SHELL":"/bin/zsh","LC_NAME":"zh_CN.UTF-8","LC_MEASUREMENT":"zh_CN.UTF-8","LC_IDENTIFICATION":"zh_CN.UTF-8","PWD":"/home/shane","SSH_CONNECTION":"10.100.150.206 13245 10.100.120.23 22","LC_NUMERIC":"zh_CN.UTF-8","LC_PAPER":"zh_CN.UTF-8","VSCODE_CWD":"/home/shane","VSCODE_NLS_CONFIG":"{\"userLocale\":\"en\",\"osLocale\":\"en\",\"resolvedLanguage\":\"en\",\"defaultMessagesFile\":\"/data0/shane/.vscode-server/cli/servers/Stable-fabdb6a30b49f79a7aba0f2ad9df9b399473380f/server/out/nls.messages.json\",\"locale\":\"en\",\"availableLanguages\":{}}","VSCODE_HANDLES_SIGPIPE":"true","ZSH":"/home/shane/.oh-my-zsh","PAGER":"less","LESS":"-R","LSCOLORS":"Gxfxcxdxbxegedabagacad","LS_COLORS":"","AWS_PROFILE":"bizops-prod","PIP_CACHE_DIR":"/data0/shane/.cache/pip","ZOOM_PYPI_INDEX_URL":"https://shane.zhou:<hidden>@artifacts.corp.zoom.us/artifactory/api/pypi/zoom-pypi-virtual/simple","PYTHONPATH":"/home/shane/repos/ai/zoom-ml-utils/src/utils:/home/shane/repos/ai/zoom-ml-utils/src/core:/home/shane/repos/ai/unified-ai:/home/shane/repos/ai/ml-utils/src:/home/shane/repos/asr/smartchat/smart_prompt/src:/home/shane/repos/asr/asr-offline-v3/transcription_pipeline/src:/home/shane/repos/asr/asr-offline-v3/asr_kernel/python/src:/home/shane/repos/asr/asr-offline-multi-language/transcription_preprocessor_service/src:/home/shane/repos/asr/asr-offline-multi-language/language_transcription_service/src:/home/shane/repos/asr/asr-offline-multi-language/metrics_service/src:/home/shane/repos/asr/asr-offline-multi-language/contracts/src:/home/shane/repos/asr/asr-offline-multi-language/common/src:/home/shane/repos/asr/asr-offline-multi-language/amq_service/src","JAVA_HOME":"/usr/lib/jvm/java-11-openjdk-amd64/","XMAKE_ROOTDIR":"/home/shane/.local/bin","XMAKE_EXE":"/home/shane/.local/bin/xmake","CONDA_EXE":"/home/shane/miniconda3/bin/conda","_CE_M":"","_CE_CONDA":"","CONDA_PYTHON_EXE":"/home/shane/miniconda3/bin/python","CONDA_SHLVL":"2","CONDA_PREFIX":"/home/shane/miniconda3/envs/py310","CONDA_DEFAULT_ENV":"py310","CONDA_PROMPT_MODIFIER":"(py310) ","GPG_TTY":"not a tty","CONDA_PREFIX_1":"/home/shane/miniconda3","VCPKG_ROOT":"/data0/shane/mine/vcpkg","VSCODE_ESM_ENTRYPOINT":"vs/workbench/api/node/extensionHostProcess","VSCODE_HANDLES_UNCAUGHT_ERRORS":"true","BROWSER":"/data0/shane/.vscode-server/cli/servers/Stable-fabdb6a30b49f79a7aba0f2ad9df9b399473380f/server/bin/helpers/browser.sh","ELECTRON_RUN_AS_NODE":"1","VSCODE_IPC_HOOK_CLI":"/run/user/1015/vscode-ipc-f002ee52-8428-4887-9841-b849259c01ee.sock","VSCODE_L10N_BUNDLE_LOCATION":""}
[cmake] -- Running vcpkg install
[cmake] Detecting compiler hash for triplet x64-linux...
[cmake] All requested packages are currently installed.
[cmake] Restored 0 package(s) from /home/shane/.cache/vcpkg/archives in 1.944 us. Use --debug to see more details.
[cmake] 
[cmake] Total elapsed time: 572.7 ms
[cmake] The package fmt provides CMake targets:
[cmake] 
[cmake]     find_package(fmt CONFIG REQUIRED)
[cmake]     target_link_libraries(main PRIVATE fmt::fmt)
[cmake] 
[cmake]     # Or use the header-only version
[cmake]     find_package(fmt CONFIG REQUIRED)
[cmake]     target_link_libraries(main PRIVATE fmt::fmt-header-only)
[cmake] 
[cmake] The package gtest is compatible with built-in CMake targets:
[cmake] 
[cmake]     enable_testing()
[cmake]     
[cmake]     find_package(GTest CONFIG REQUIRED)
[cmake]     target_link_libraries(main PRIVATE GTest::gtest GTest::gtest_main GTest::gmock GTest::gmock_main)
[cmake]     
[cmake]     add_test(AllTestsInMain main)
[cmake] 
[cmake] The package spdlog provides CMake targets:
[cmake] 
[cmake]     find_package(spdlog CONFIG REQUIRED)
[cmake]     target_link_libraries(main PRIVATE spdlog::spdlog)
[cmake] 
[cmake]     # Or use the header-only version
[cmake]     find_package(spdlog CONFIG REQUIRED)
[cmake]     target_link_libraries(main PRIVATE spdlog::spdlog_header_only)
[cmake] 
[cmake] -- Running vcpkg install - done
[cmake] 
[cmake] Project [algs] configuring begin...
[cmake] ---------------------------------- System Basics ----------------------------------
[cmake] 
[cmake] ---------------------------------- Prerequisites ----------------------------------
[cmake] ---------------------------------- Options/Properties ----------------------------------
[cmake] ---------------------------------- Libraries/Executables ----------------------------------
[cmake] -- CMAKE_SYSTEM="Linux-5.15.0-69-generic"
[cmake] -- CMAKE_SYSTEM_PROCESSOR="x86_64"
[cmake] -- CMAKE_COMMAND="/usr/local/bin/cmake"
[cmake] -- CMAKE_VERSION="3.24.1"
[cmake] -- CMAKE_MAKE_PROGRAM="/usr/bin/ninja"
[cmake] -- CMAKE_CXX_COMPILER="/usr/bin/c++"
[cmake] -- CMAKE_CXX_COMPILER_ID="GNU"
[cmake] -- CMAKE_CXX_COMPILER_VERSION="9.4.0"
[cmake] -- CMAKE_MODULE_PATH="/data0/shane/mine/workspace/talks-snippets/cpp-feature-snippets/cmake"
[cmake] -- CMAKE_BUILD_TYPE=""
[cmake] -- ENABLE_PERF="OFF"
[cmake] -- ENABLE_TEST="OFF"
[cmake] Current binary dir: /data0/shane/mine/workspace/talks-snippets/cpp-feature-snippets/build/test
[cmake] 
[cmake] Project [algs] configuring end...
[cmake] -- Configuring done
[cmake] -- Generating done
[cmake] -- Build files have been written to: /data0/shane/mine/workspace/talks-snippets/cpp-feature-snippets/build
[cmakefileapi-parser] Read reply folder: /data0/shane/mine/workspace/talks-snippets/cpp-feature-snippets/build/.cmake/api/v1/reply
[cmakefileapi-parser] Found index files: ["cache-v2-2b3ba4ffde1a89931aa4.json","cmakeFiles-v1-bb99415d2590417178af.json","codemodel-v2-cac71f35528a6861fa39.json","directory-.-f5ebdc15457944623624.json","directory-test-451c0598f41488bb20b9.json","index-2024-12-25T10-53-50-0535.json","target-main_spin_atomic_async-477a0ce0d09b8daffa44.json","target-main_spin_atomic_thread-7b69028aa0713b9cde17.json","target-main_spin_cv_async-2ad18791861352de99ef.json","target-main_spin_cv_thread-e5b185386283780dfbd3.json","target-main_spin_future_async-134137a38577df77373b.json","target-main_spin_future_thread-8ec2f69a7027f5d4039a.json","target-test_CRTP-2bb8c03ce5d74d909daf.json","target-test_alias_template-84b9d4f3a6996538b819.json","target-test_all_cast-84d7c4fce02e397d69a8.json","target-test_async-e39039eab78f65a20bc7.json","target-test_atomic-490cc631a2a2bfff8c77.json","target-test_auto_type_deduction-eb89108deb4f6bd2c390.json","target-test_barrier-1870e0eada4c6ea3b2b5.json","target-test_base_invoke_subclass-85a35007ece8ad6b8b6e.json","target-test_bind-402f8e9956d25c1c39e3.json","target-test_cache_consistency_visibility-8752e70780e7269ab5f2.json","target-test_capture-aba4c928c8fca4c04ab6.json","target-test_common_traits-ce5ec2f84388278b2f10.json","target-test_const_cast-3ab218397ea8bdc7f6d6.json","target-test_const_iterator-19b49b3b07fb2ee94646.json","target-test_constexpr-a516fb061eb496f1d1a0.json","target-test_decltype-1afb50e378563ea22b22.json","target-test_emplace-f913fe00b9c13df2b386.json","target-test_enable_if-4dbaa25cb6032d9e9c39.json","target-test_endianness-7270ee9d22210cc3c808.json","target-test_exception_in_thread-082a701a4852a321e033.json","target-test_false_wakeup-906e89c1c815e2b1654d.json","target-test_final-b11f64e29c8db5d40d7f.json","target-test_forward-410c7d6b2c8866136468.json","target-test_function-7ab76c846d6c5bb41840.json","target-test_function_parameter-b9fc664e8a1b8aa58d11.json","target-test_function_pointer-22cd6d465dfe5ff6e3b6.json","target-test_future-29f60da27855e20b5922.json","target-test_future_wakeup-021b6913a9be0ffb607d.json","target-test_initializer_list-cd6e87b108c62570c4ab.json","target-test_invoke-29f6c3157a1d24f41219.json","target-test_is_iterable-9aa50ef0274ad86f0276.json","target-test_jthread-76ad1abb483c8b008006.json","target-test_lost_wakeup-a298fe92c79dc501799f.json","target-test_map-06d2a9f5c05191ce6ea6.json","target-test_no-494a430b22e116cf0dbd.json","target-test_noexcept-3fc7c003ef580e98270b.json","target-test_nullptr-35b925c8101cdefa4427.json","target-test_operator_bool-4dd724bad8b883932dff.json","target-test_override-d8d2fd4c6db1b0d99a05.json","target-test_perfect_forward_failure-916fb3b7e33e7decb77b.json","target-test_polymorphism-415b1e5a725b42dd8c02.json","target-test_pool-b193882d4567dd6dee0a.json","target-test_pq-f14d54a6df5b1bc2fab5.json","target-test_promise-42c94c4759cd5a60fbdd.json","target-test_queue-71562ee7a3a98d0fe03e.json","target-test_rdtsc-cb632b564cae0a26ebc1.json","target-test_reference_qualifiers-feca397560914d981864.json","target-test_remove_const_from_pointer-089270e0717f867a9ea2.json","target-test_rwlock-ef7dd2988d2f8f5fb827.json","target-test_scoped_enums-793770027b1793efaa8c.json","target-test_scoped_lock-e4348f1929ace6e97b92.json","target-test_shared-d082ec9fa8a2e2ec332c.json","target-test_shared_multi_threaded-a97becfd6d184ffd88d8.json","target-test_special_member_generation-a1fbc73d3a9f2c301ebe.json","target-test_string-30777783647554b3b3cc.json","target-test_structured_binding-c737e1867eb5e7e59607.json","target-test_tag_dispatch-0af38e8435289c1a11bc.json","target-test_template_type_deduction-6c64374e2c0f9ba1f244.json","target-test_thread_safety_of_const_method-35c7dc673a3b12746d1c.json","target-test_timed_reentrant-b36f2639644d338ab0c5.json","target-test_unique-397eefd29c69d6e2efd3.json","target-test_universal_ctor-3ab526898ae274cf032e.json","target-test_unordered_set-03974d3ba908c385c9e4.json","target-test_value-b6129fbb9a2fc56e0978.json","target-test_variable_define-55a548e1b09c1585b5d7.json","target-test_vector_bool-7ac3aca21681c9d1ae92.json","target-test_weak-e7ded8385bcc1c81f821.json","toolchains-v1-ee5ca47e57a615ee224c.json"]
[cache] Reading CMake cache file /data0/shane/mine/workspace/talks-snippets/cpp-feature-snippets/build/CMakeCache.txt
[cache] Parsing CMake cache string
[cache] Reading CMake cache file /data0/shane/mine/workspace/talks-snippets/cpp-feature-snippets/build/CMakeCache.txt
[cache] Parsing CMake cache string

Additional Information

No response

@github-project-automation github-project-automation bot moved this to Blocked in CMake Tools Dec 25, 2024
@Yingzi1234 Yingzi1234 added more info needed More info is needed from the community for us to properly triage and investigate. and removed triage labels Dec 27, 2024
@Yingzi1234
Copy link
Collaborator

@yszhou2019 Thank you for your github issue! We would like to repro your issue, could you give us a repro steps?

@yszhou2019
Copy link
Author

yszhou2019 commented Dec 27, 2024

@Yingzi1234 Thanks for your quick reply! Please check the zip file. You need give a correct value to "VCPKG_ROOT" in CMakeUserPresets.json. github-ms-cmake-tools.zip

  adding: github-ms-cmake-tools/test/ (stored 0%)
  adding: github-ms-cmake-tools/test/demo/ (stored 0%)
  adding: github-ms-cmake-tools/test/demo/test_demo.cpp (deflated 54%)
  adding: github-ms-cmake-tools/test/CMakeLists.txt (deflated 64%)
  adding: github-ms-cmake-tools/CMakeLists.txt (deflated 63%)
  adding: github-ms-cmake-tools/CMakePresets.json (deflated 30%)
  adding: github-ms-cmake-tools/CMakeUserPresets.json (deflated 34%)
  adding: github-ms-cmake-tools/vcpkg-configuration.json (deflated 37%)
  adding: github-ms-cmake-tools/vcpkg.json (deflated 18%)
  adding: github-ms-cmake-tools/README (deflated 31%)

@Yingzi1234
Copy link
Collaborator

@yszhou2019 Thank you for your github issue! We're not sure if we reproduced your problem, could you watch it based on the video below. Thank you!
Image

@yszhou2019
Copy link
Author

Hey @Yingzi1234 thanks for your reply! Hoping you have a happy new year.

Linux amax 5.15.0-69-generic #76~20.04.1-Ubuntu SMP Mon Mar 20 15:54:19 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Just like I mentioned in summary, I'm using a linux server plus with vcpkg (a handy cpp lib manager by Microsoft). You need to download CMake Tools==v1.19.52 and latest vcpkg on a Linux server.

The erorr you encoutered, probably is due to MSCV compiler.

@yszhou2019
Copy link
Author

Tool version

vcpkg --version
vcpkg package management program version 2022-10-12-b586c2752f75bcc3f6a243749e9a0d94d0d93ccd

See LICENSE.txt for license information.
g++ --version
g++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
cmake --version
cmake version 3.24.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).
ninja --version
1.10.0

@gcampbell-msft
Copy link
Collaborator

@yszhou2019 Do these issues reproduce in the most recent pre-release version?

@yszhou2019
Copy link
Author

@gcampbell-msft Yes, I'm using the version published yesterday, which is v1.20.34 (pre-release).

Here is the screen recording. As you can see, I typed the target I want to run instead of selecting from a list. But even after that, "run" or "debug" button still doesn't work.

Image

@Yingzi1234
Copy link
Collaborator

@yszhou2019 Thank you for your help! We can reproduce this issue based the above information. We have been changed this issue to bug, please be patient with the results of our investigation and we will notify you of any updates as soon as they are available!

@gcampbell-msft We can reproduce the issue on latest CMake Tools version 1.20.33(pre-release) and change the Label to ‘Bug’ for now, if it is wrong could you please change it to the correct label, the reproduction steps are detailed below. Thanks!

ENV:

  1. This issue reproduced on Linux machine
  2. Install vcpkg and g++ and cmake and ninja on linux machine

Repro steps:

  1. Open this folder github-ms-cmake-tools.zip by VSCode
  2. Click F1 to run command "CMake: Configure"
  3. Click the Debug and Run button at the bottom left of the page

Actual result:
Debug and run failed
Image

@Yingzi1234 Yingzi1234 added bug a bug in the product and removed more info needed More info is needed from the community for us to properly triage and investigate. labels Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a bug in the product
Projects
Status: Blocked
Development

No branches or pull requests

3 participants