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

CMake Debugger hangs "Configuring project: ..." and doesn't open up at configuration error line

Open Ryanf55 opened this issue 1 year ago • 1 comments

Brief Issue Summary

When using the CMake debugger, sometimes it hangs and gets stuck in the configuration phase.

A configure error is reported. When I hit the "Debug" option in the popup when configuration fails, it hits the same error, and then hangs and is stuck in configuration. If I cancel the session, and try again, it still hangs.

image

There are also connect ENOENT errors to /tmp/cmake-debugger-pipe-...

CMake Tools Diagnostics

{
  "os": "linux",
  "vscodeVersion": "1.86.1",
  "cmtVersion": "1.16.32",
  "configurations": [
    {
      "folder": "/home/ryan/Dev/nav2_ws/src/navigation2/nav2_dwb_controller/costmap_queue",
      "cmakeVersion": "3.28.2",
      "configured": false,
      "generator": "Ninja",
      "usesPresets": false,
      "compilers": {}
    }
  ],
  "cpptoolsIntegration": {
    "isReady": true,
    "hasCodeModel": false,
    "activeBuildType": "",
    "buildTypesSeen": [],
    "requests": [],
    "responses": [],
    "partialMatches": [],
    "targetCount": 0,
    "executablesCount": 0,
    "librariesCount": 0,
    "targets": []
  },
  "settings": [
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": false
    }
  ]
}

Debug Log

[main] Configuring project: costmap_queue 
[driver] Removing /home/ryan/Dev/nav2_ws/src/navigation2/nav2_dwb_controller/costmap_queue/build/CMakeCache.txt
[driver] Removing /home/ryan/Dev/nav2_ws/src/navigation2/nav2_dwb_controller/costmap_queue/build/CMakeFiles
[proc] Executing command: /usr/bin/cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER:FILEPATH=/usr/lib/ccache/g++ -S/home/ryan/Dev/nav2_ws/src/navigation2/nav2_dwb_controller/costmap_queue -B/home/ryan/Dev/nav2_ws/src/navigation2/nav2_dwb_controller/costmap_queue/build -G Ninja --debugger --debugger-pipe /tmp/cmake-debugger-pipe-c0578185-d439-4e51-8809-fea162457d57
[cmake] Not searching for unused variables given on the command line.
[cmake] Running with debugger on.
[cmake] Waiting for debugger client to connect...
[debugger] Connecting debugger on named pipe: "/tmp/cmake-debugger-pipe-c0578185-d439-4e51-8809-fea162457d57"
[cmake] Debugger client connected.
[cmake] -- The C compiler identification is GNU 11.4.0
[cmake] -- The CXX compiler identification is GNU 11.4.0
[cmake] -- Detecting C compiler ABI info
[cmake] -- Detecting C compiler ABI info - done
[cmake] -- Check for working C compiler: /usr/lib/ccache/gcc - 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: /usr/lib/ccache/g++ - skipped
[cmake] -- Detecting CXX compile features
[cmake] -- Detecting CXX compile features - done
[cmake] -- Found ament_cmake: 2.3.0 (/opt/ros/rolling/share/ament_cmake/cmake)
[cmake] -- Found Python3: /usr/bin/python3.10 (found version "3.10.12") found components: Interpreter 
[cmake] -- Found nav2_common: 1.2.0 (/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_common/share/nav2_common/cmake)
[cmake] -- Found nav2_costmap_2d: 1.2.0 (/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_costmap_2d/share/nav2_costmap_2d/cmake)
[cmake] -- Found rosidl_generator_c: 4.4.1 (/opt/ros/rolling/share/rosidl_generator_c/cmake)
[cmake] -- Found rosidl_generator_cpp: 4.4.1 (/opt/ros/rolling/share/rosidl_generator_cpp/cmake)
[cmake] -- Using all available rosidl_typesupport_c: rosidl_typesupport_fastrtps_c;rosidl_typesupport_introspection_c
[cmake] -- Using all available rosidl_typesupport_cpp: rosidl_typesupport_fastrtps_cpp;rosidl_typesupport_introspection_cpp
[cmake] -- Found rmw_implementation_cmake: 7.2.1 (/opt/ros/rolling/share/rmw_implementation_cmake/cmake)
[cmake] -- Found rmw_fastrtps_cpp: 7.6.0 (/opt/ros/rolling/share/rmw_fastrtps_cpp/cmake)
[cmake] -- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "3.0.2")  
[cmake] -- Found FastRTPS: /opt/ros/rolling/include  
[cmake] -- Using RMW implementation 'rmw_fastrtps_cpp' as default
[cmake] -- Found Eigen3: TRUE (found version "3.4.0") 
[cmake] -- Ensuring Eigen3 include directory is part of orocos-kdl CMake target
[cmake] -- Found ament_lint_auto: 0.16.0 (/opt/ros/rolling/share/ament_lint_auto/cmake)
[cmake] -- Found gtest sources under '/opt/ros/rolling/src/gtest_vendor': C++ tests using 'Google Test' will be built
[cmake] -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
[cmake] -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
[cmake] -- Found Threads: TRUE  
[cmake] -- Added test 'cppcheck' to perform static code analysis on C / C++ code
[cmake] -- Configured cppcheck include dirs: /home/ryan/Dev/nav2_ws/src/navigation2/nav2_dwb_controller/costmap_queue/include
[cmake] -- Configured cppcheck exclude dirs and/or files: 
[cmake] -- Added test 'cpplint' to check C / C++ code against the Google style
[cmake] -- Configured cpplint exclude dirs and/or files: 
[cmake] -- Added test 'lint_cmake' to check CMake code style
[cmake] -- Added test 'uncrustify' to check C / C++ code style
[cmake] -- Configured uncrustify additional arguments: 
[cmake] -- Added test 'xmllint' to check XML markup files
[cmake] -- Configuring done (3.0s)
[cmake] CMake Error at /opt/ros/rolling/share/ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake:146 (target_link_libraries):
[cmake]   Target "costmap_queue" links to:
[cmake] 
[cmake]     nav2_costmap_2d::nav2_costmap_2d_markers
[cmake] 
[cmake]   but the target was not found.  Possible reasons include:
[cmake] 
[cmake]     * There is a typo in the target name.
[cmake]     * A find_package call is missing for an IMPORTED target.
[cmake]     * An ALIAS target is missing.
[cmake] 
[cmake] Call Stack (most recent call first):
[cmake]   CMakeLists.txt:25 (ament_target_dependencies)
[cmake] 
[cmake] 
[main] Configuring project: costmap_queue 
[main] Configuring project: costmap_queue 
[extension] [3735] cmake.buildDirectory started
[extension] [3735] cmake.buildDirectory finished (returned "/home/ryan/Dev/nav2_ws/src/navigation2/nav2_dwb_controller/costmap_queue/build")
[main] Configuring project: costmap_queue 
[main] Saving open files before configure/build
[main] Configuring project: costmap_queue 
[main] Saving open files before configure/build
[cmake] CMake Error at /opt/ros/rolling/share/ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake:146 (target_link_libraries):
[cmake]   Target "mbq_test" links to:
[cmake] 
[cmake]     nav2_costmap_2d::nav2_costmap_2d_markers
[cmake] 
[cmake]   but the target was not found.  Possible reasons include:
[cmake] 
[cmake]     * There is a typo in the target name.
[cmake]     * A find_package call is missing for an IMPORTED target.
[cmake]     * An ALIAS target is missing.
[cmake] 
[cmake] Call Stack (most recent call first):
[cmake]   CMakeLists.txt:38 (ament_target_dependencies)
[cmake] 
[cmake] 
[cmake] CMake Error at /opt/ros/rolling/share/ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake:146 (target_link_libraries):
[cmake]   Target "utest" links to:
[cmake] 
[cmake]     nav2_costmap_2d::nav2_costmap_2d_markers
[cmake] 
[cmake]   but the target was not found.  Possible reasons include:
[cmake] 
[cmake]     * There is a typo in the target name.
[cmake]     * A find_package call is missing for an IMPORTED target.
[cmake]     * An ALIAS target is missing.
[cmake] 
[cmake] Call Stack (most recent call first):
[cmake]   CMakeLists.txt:41 (ament_target_dependencies)
[cmake] 
[cmake] 
[cmake] CMake Generate step failed.  Build files cannot be regenerated correctly.
[cmake] -- Generating done (111.5s)
[proc] The command: /usr/bin/cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER:FILEPATH=/usr/lib/ccache/g++ -S/home/ryan/Dev/nav2_ws/src/navigation2/nav2_dwb_controller/costmap_queue -B/home/ryan/Dev/nav2_ws/src/navigation2/nav2_dwb_controller/costmap_queue/build -G Ninja --debugger --debugger-pipe /tmp/cmake-debugger-pipe-c0578185-d439-4e51-8809-fea162457d57 exited with code: 1
[proc] The command: pgrep -P 1488685 exited with code: 1
[proc] The command: pgrep -P 1488685 exited with code: 1
[proc] The command: pgrep -P 1488685 exited with code: 1
[proc] The command: pgrep -P 1488685 exited with code: 1
[proc] The command: pgrep -P 1488685 exited with code: 1
[main] Starting new CMake driver
[main] Starting CMake driver
[cmakefileapi-driver] Creating instance of CMakeFileApiDriver
[driver] Initializing base driver using kit
[kit] Testing GCC binary: /usr/lib/ccache/gcc
[proc] Executing command: /usr/lib/ccache/gcc -v
[kit] Detected GCC compiler: /usr/lib/ccache/gcc
[driver] CMakeDriver Kit set to GCC 11.4.0 x86_64-linux-gnu
[kit] The environment for kit 'GCC 11.4.0 x86_64-linux-gnu': {
  "AMENT_PREFIX_PATH": "/home/ryan/Dev/nav2_ws/src/navigation2/install/nav_2d_utils:/home/ryan/Dev/nav2_ws/src/navigation2/install/dwb_msgs:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav_2d_msgs:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_costmap_2d:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_voxel_grid:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_map_server:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_lifecycle_manager:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_util:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_msgs:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_common:/opt/ros/rolling",
  "CHROME_DESKTOP": "code-url-handler.desktop",
  "CMAKE_PREFIX_PATH": "/home/ryan/Dev/nav2_ws/src/navigation2/install/nav_2d_utils:/home/ryan/Dev/nav2_ws/src/navigation2/install/dwb_msgs:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav_2d_msgs:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_costmap_2d:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_voxel_grid:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_map_server:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_lifecycle_manager:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_util:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_msgs:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_common",
  "COLCON_PREFIX_PATH": "/home/ryan/Dev/nav2_ws/src/navigation2/install",
  "COLORTERM": "truecolor",
  "DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/1000/bus",
  "DESKTOP_SESSION": "ubuntu",
  "DISPLAY": ":1",
  "ELECTRON_NO_ATTACH_CONSOLE": "1",
  "GDK_BACKEND": "x11",
  "GDK_BACKEND_VSCODE_SNAP_ORIG": "x11",
  "GDK_PIXBUF_MODULEDIR": "/snap/code/151/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders",
  "GDK_PIXBUF_MODULE_FILE": "/home/ryan/snap/code/common/.cache/gdk-pixbuf-loaders.cache",
  "GDMSESSION": "ubuntu",
  "GIO_MODULE_DIR": "/home/ryan/snap/code/common/.cache/gio-modules",
  "GIO_MODULE_DIR_VSCODE_SNAP_ORIG": "/home/ryan/snap/code/common/.cache/gio-modules",
  "GIT_ASKPASS": "/snap/code/151/usr/share/code/resources/app/extensions/git/dist/askpass.sh",
  "GNOME_DESKTOP_SESSION_ID": "this-is-deprecated",
  "GNOME_SHELL_SESSION_MODE": "ubuntu",
  "GNOME_TERMINAL_SCREEN": "/org/gnome/Terminal/screen/46d278ee_e5d2_4e16_8c67_f5c3732732c7",
  "GNOME_TERMINAL_SERVICE": ":1.124",
  "GPG_AGENT_INFO": "/run/user/1000/gnupg/S.gpg-agent:0:1",
  "GSETTINGS_SCHEMA_DIR": "/home/ryan/snap/code/151/.local/share/glib-2.0/schemas",
  "GSETTINGS_SCHEMA_DIR_VSCODE_SNAP_ORIG": "/home/ryan/snap/code/151/.local/share/glib-2.0/schemas",
  "GTK_EXE_PREFIX": "/snap/code/151/usr",
  "GTK_EXE_PREFIX_VSCODE_SNAP_ORIG": "/snap/code/151/usr",
  "GTK_IM_MODULE": "ibus",
  "GTK_IM_MODULE_FILE": "/home/ryan/snap/code/common/.cache/immodules/immodules.cache",
  "GTK_IM_MODULE_FILE_VSCODE_SNAP_ORIG": "/home/ryan/snap/code/common/.cache/immodules/immodules.cache",
  "GTK_MODULES": "gail:atk-bridge",
  "GTK_PATH": "/snap/code/151/usr/lib/x86_64-linux-gnu/gtk-3.0:/snap/code/151/usr/lib/x86_64-linux-gnu/gtk-3.0",
  "GTK_PATH_VSCODE_SNAP_ORIG": "/snap/code/151/usr/lib/x86_64-linux-gnu/gtk-3.0",
  "GZ_SIM_RESOURCE_PATH": "/home/ryan/Dev/ros2_ws/src/ardupilot_gazebo/models:/home/ryan/Dev/ros2_ws/src/ardupilot_gazebo/worlds:/home/ryan/Dev/ros2_ws/src/ardupilot_gazebo/models:/home/ryan/Dev/ros2_ws/src/ardupilot_gazebo/worlds:",
  "GZ_SIM_SYSTEM_PLUGIN_PATH": "/home/ryan/Dev/ros2_ws/src/ardupilot_gazebo/build:/home/ryan/Dev/ros2_ws/src/ardupilot_gazebo/build:",
  "GZ_VERSION": "harmonic",
  "HOME": "/home/ryan",
  "IM_CONFIG_PHASE": "1",
  "LANG": "en_US.UTF-8",
  "LC_ALL": "en_US.UTF-8",
  "LD_LIBRARY_PATH": "/home/ryan/Dev/nav2_ws/src/navigation2/install/nav_2d_utils/lib:/home/ryan/Dev/nav2_ws/src/navigation2/install/dwb_msgs/lib:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav_2d_msgs/lib:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_costmap_2d/lib:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_voxel_grid/lib:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_map_server/lib:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_lifecycle_manager/lib:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_util/lib:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_msgs/lib:/opt/ros/rolling/opt/rviz_ogre_vendor/lib:/opt/ros/rolling/lib/x86_64-linux-gnu:/opt/ros/rolling/lib",
  "LESSCLOSE": "/usr/bin/lesspipe %s %s",
  "LESSOPEN": "| /usr/bin/lesspipe %s",
  "LIBVIRT_DEFAULT_URI": "qemu:///system",
  "LOCPATH": "/snap/code/151/usr/lib/locale:/snap/code/151/usr/lib/locale",
  "LOCPATH_VSCODE_SNAP_ORIG": "/snap/code/151/usr/lib/locale",
  "LOGNAME": "ryan",
  "LS_COLORS": "rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:",
  "NO_AT_BRIDGE": "1",
  "ORIGINAL_XDG_CURRENT_DESKTOP": "Unity",
  "PATH": "/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_costmap_2d/bin:/opt/ros/rolling/bin:/home/ryan/.pyenv/versions/3.12.0/bin:/opt/gcc-arm-none-eabi-9-2020-q2-update/bin:/home/ryan/.cargo/bin:/usr/lib/ccache:/opt/gcc-arm-none-eabi-10-2020-q4-major/bin:/home/ryan/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/ryan/.local/bin:/home/ryan/.local/bin:/home/ryan/Dev/ros2_ws/src/Micro-XRCE-DDS-Gen/scripts:/home/ryan/.local/bin:/home/ryan/Dev/ros2_ws/src/Micro-XRCE-DDS-Gen/scripts",
  "PWD": "/home/ryan/Dev/nav2_ws/src/navigation2/nav2_dwb_controller/costmap_queue",
  "PYTHONPATH": "/home/ryan/Dev/nav2_ws/src/navigation2/install/dwb_msgs/lib/python3.10/site-packages:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav_2d_msgs/lib/python3.10/site-packages:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_msgs/lib/python3.10/site-packages:/home/ryan/Dev/nav2_ws/src/navigation2/install/nav2_common/lib/python3.10/site-packages:/opt/ros/rolling/lib/python3.10/site-packages",
  "QT_ACCESSIBILITY": "1",
  "QT_IM_MODULE": "ibus",
  "ROS_AUTOMATIC_DISCOVERY_RANGE": "SUBNET",
  "ROS_DISTRO": "rolling",
  "ROS_PYTHON_VERSION": "3",
  "ROS_VERSION": "2",
  "SESSION_MANAGER": "local/B650-970:@/tmp/.ICE-unix/3293,unix/B650-970:/tmp/.ICE-unix/3293",
  "SHELL": "/bin/bash",
  "SHLVL": "2",
  "SNAP": "/snap/code/151",
  "SNAP_ARCH": "amd64",
  "SNAP_COMMON": "/var/snap/code/common",
  "SNAP_CONTEXT": "XGrSqCT9Myk0pgNIHH_1-Hg53xTWScG8QxV-3-WezeZxvkvJs4bG",
  "SNAP_COOKIE": "XGrSqCT9Myk0pgNIHH_1-Hg53xTWScG8QxV-3-WezeZxvkvJs4bG",
  "SNAP_DATA": "/var/snap/code/151",
  "SNAP_EUID": "1000",
  "SNAP_INSTANCE_NAME": "code",
  "SNAP_LAUNCHER_ARCH_TRIPLET": "x86_64-linux-gnu",
  "SNAP_LIBRARY_PATH": "/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void",
  "SNAP_NAME": "code",
  "SNAP_REAL_HOME": "/home/ryan",
  "SNAP_REVISION": "151",
  "SNAP_UID": "1000",
  "SNAP_USER_COMMON": "/home/ryan/snap/code/common",
  "SNAP_USER_DATA": "/home/ryan/snap/code/151",
  "SNAP_VERSION": "31c37ee8",
  "SSH_AGENT_LAUNCHER": "gnome-keyring",
  "SSH_AGENT_PID": "7999",
  "SSH_AUTH_SOCK": "/tmp/ssh-XXXXXXCb47BU/agent.7997",
  "SYSTEMD_EXEC_PID": "3510",
  "TERM": "xterm-256color",
  "TERM_PROGRAM": "vscode",
  "TERM_PROGRAM_VERSION": "1.86.1",
  "USER": "ryan",
  "USERNAME": "ryan",
  "VSCODE_AMD_ENTRYPOINT": "vs/workbench/api/node/extensionHostProcess",
  "VSCODE_CLI": "1",
  "VSCODE_CODE_CACHE_PATH": "/home/ryan/.config/Code/CachedData/31c37ee8f63491495ac49e43b8544550fbae4533",
  "VSCODE_CRASH_REPORTER_PROCESS_TYPE": "extensionHost",
  "VSCODE_CWD": "/home/ryan/Dev/nav2_ws/src/navigation2/nav2_dwb_controller/costmap_queue",
  "VSCODE_GIT_ASKPASS_MAIN": "/snap/code/151/usr/share/code/resources/app/extensions/git/dist/askpass-main.js",
  "VSCODE_GIT_ASKPASS_NODE": "/snap/code/151/usr/share/code/code",
  "VSCODE_GIT_IPC_HANDLE": "/run/user/1000/vscode-git-9afd8ac4a1.sock",
  "VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
  "VSCODE_IPC_HOOK": "/run/user/1000/vscode-01d69257-1.86-main.sock",
  "VSCODE_NLS_CONFIG": "{\"locale\":\"en-us\",\"osLocale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}",
  "VSCODE_PID": "8088",
  "VTE_VERSION": "6800",
  "WINDOWPATH": "2",
  "XAUTHORITY": "/run/user/1000/gdm/Xauthority",
  "XDG_CONFIG_DIRS": "/etc/xdg/xdg-ubuntu:/etc/xdg",
  "XDG_CONFIG_DIRS_VSCODE_SNAP_ORIG": "/etc/xdg/xdg-ubuntu:/etc/xdg",
  "XDG_CURRENT_DESKTOP": "Unity",
  "XDG_DATA_DIRS": "/home/ryan/snap/code/151/.local/share:/home/ryan/snap/code/151:/snap/code/151/usr/share:/home/ryan/snap/code/151/.local/share:/home/ryan/snap/code/151:/snap/code/151/usr/share:/usr/share/ubuntu:/usr/share/gnome:/home/ryan/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop",
  "XDG_DATA_DIRS_VSCODE_SNAP_ORIG": "/home/ryan/snap/code/151/.local/share:/home/ryan/snap/code/151:/snap/code/151/usr/share:/usr/share/ubuntu:/usr/share/gnome:/home/ryan/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop",
  "XDG_MENU_PREFIX": "gnome-",
  "XDG_RUNTIME_DIR": "/run/user/1000",
  "XDG_SESSION_CLASS": "user",
  "XDG_SESSION_DESKTOP": "ubuntu",
  "XDG_SESSION_TYPE": "x11",
  "XMODIFIERS": "@im=ibus",
  "ELECTRON_RUN_AS_NODE": "1",
  "APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL": "1",
  "VSCODE_L10N_BUNDLE_LOCATION": ""
}
[driver] Trying to detect generator supported by system
[extension] [1950] cmake.cleanConfigureWithDebugger finished (returned 1)
[cache] Reading CMake cache file /home/ryan/Dev/nav2_ws/src/navigation2/nav2_dwb_controller/costmap_queue/build/CMakeCache.txt
[cache] Parsing CMake cache string
[cache] Reading CMake cache file /home/ryan/Dev/nav2_ws/src/navigation2/nav2_dwb_controller/costmap_queue/build/CMakeCache.txt
[cache] Parsing CMake cache string
[cmakefileapi-parser] Read reply folder: /home/ryan/Dev/nav2_ws/src/navigation2/nav2_dwb_controller/costmap_queue/build/.cmake/api/v1/reply
[driver] Setting new variant Debug
[cache] Reading CMake cache file /home/ryan/Dev/nav2_ws/src/navigation2/nav2_dwb_controller/costmap_queue/build/CMakeCache.txt
[cache] Parsing CMake cache string
[debugger] Connecting debugger on named pipe: "/tmp/cmake-debugger-pipe-c0578185-d439-4e51-8809-fea162457d57"

Additional Information

I run into this error when doing build system work and using the debugger frequently. Perhaps it's caused by trying to configure twice in two different places? There are no pipes for the CMake debugger to connect to - seems to be waiting for a pipe that doesn't exist.

ryan@B650-970:~/Dev/nav2_ws/src/navigation2/nav2_dwb_controller/costmap_queue$ ls /tmp/cmake*
ls: cannot access '/tmp/cmake*': No such file or directory

I can also see a hung process that remains after VSCode is closed:

COMMAND
/usr/bin/cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER:FILEPATH=/usr/lib/ccache/g++ -S/home/ryan/Dev/nav2_ws/src/navigation2/nav2_dwb_controller/costmap_queue -B/home/ryan/Dev/nav2_ws/src/navigation2/nav2_dwb_controller/costmap_queue/build -G Ninja --debugger --debugger-pipe /tmp/cmake-debugger-pipe-d1860702-3043-4d1b-b090-331649df175a

Ryanf55 avatar Feb 13 '24 06:02 Ryanf55

@Ryanf55 It could be that yes, a cmake debug session isn't being properly closed, or that when trying to run it quickly it hits issues.

Could you possibly provide a minimal repro so that I can investigate this further? It would be great to have a small repro project with minimal repro steps. Thanks.

gcampbell-msft avatar Feb 13 '24 14:02 gcampbell-msft

I met this problem too.

QiuYilin avatar May 24 '24 03:05 QiuYilin

@QiuYilin Thank you for your GitHub issues! We are currently trying to reproduce your problem, could you provide a minimal reproduction project and specific reproduction steps so we can investigate further?

Yingzi1234 avatar May 27 '24 07:05 Yingzi1234

It's hard to say. Apart from the phenomenon in the title, I don't have any other phenomena to describe. Any tips?

QiuYilin avatar May 27 '24 09:05 QiuYilin

@Ryanf55 Is your problem currently recurring? We are currently trying to reproduce your problem, could you provide a minimal reproduction project and specific reproduction steps so we can investigate further?

Yingzi1234 avatar May 30 '24 08:05 Yingzi1234

@Ryanf55 Is your problem currently recurring? We are currently trying to reproduce your problem, could you provide a minimal reproduction project and specific reproduction steps so we can investigate further?

Yep! I just tried the debugger on a current project. I can reproduce it by:

  • Creating a CMakeLists file that has a problem during the configure phase
  • Use the VSCOde CMake: Configure with CMake Debugger
  • The debugger will halt on the line
  • Hit the restart arrow on the debugger to try again
  • You will get a connect ENOENT error as posed above

If I get some time, I can try to create a minimum reproducible example.

Version: 1.89.1 (user setup)
Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685
Date: 2024-05-07T05:13:33.891Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Windows_NT x64 10.0.19045

Ryanf55 avatar May 30 '24 21:05 Ryanf55

@Ryanf55 @gcampbell-msft We can reproduce this issue on latest version, you can get the details below.

ENV: VSCode: 1.89.1 CMake tools: v1.19.0(pre-release) C/C++: v1.20.5 Platform: Mac

Repro steps:

  1. Open this project Test.zip with VSCode
  2. Click F1 to run "CMake: configure" command
  3. Open CMakeLists.txt file and set a breakpoint in it
  4. Click F1 to run "CMake: Configure with CMake Debugger" command
  5. Re-run "CMake: Configure with CMake Debugger" command

Expected result: It should debug successfully

Actual result: The debug failed.

Output window:

main] Configuring project: Test 
[proc] Executing command: /usr/local/bin/cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++ --no-warn-unused-cli -S/Users/beyondtest/Desktop/Test -B/Users/beyondtest/Desktop/Test/build -G Ninja --debugger --debugger-pipe /tmp/cmake-debugger-pipe-b6afcaa0-c6f1-460a-a1a3-dd1e94b7fbf1
[cmake] Not searching for unused variables given on the command line.
[cmake] Running with debugger on.
[cmake] Waiting for debugger client to connect...
[debugger] Connecting debugger on named pipe: "/tmp/cmake-debugger-pipe-b6afcaa0-c6f1-460a-a1a3-dd1e94b7fbf1"
[cmake] Debugger client connected.
[cmake] CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
[cmake]   cmake_minimum_required called with unknown argument "version".
[cmake] 
[cmake] 
[cmake] CMake Warning (dev) at CMakeLists.txt:2 (project):
[cmake]   cmake_minimum_required() should be called prior to this top-level project()
[cmake]   call.  Please see the cmake-commands(7) manual for usage documentation of
[cmake]   both commands.
[cmake] This warning is for project developers.  Use -Wno-dev to suppress it.
[cmake] 
[proc] The command: pgrep -P 33473 exited with code: 1
[proc] The command: /usr/local/bin/cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++ --no-warn-unused-cli -S/Users/beyondtest/Desktop/Test -B/Users/beyondtest/Desktop/Test/build -G Ninja --debugger --debugger-pipe /tmp/cmake-debugger-pipe-b6afcaa0-c6f1-460a-a1a3-dd1e94b7fbf1 exited with code: null and signal: SIGINT
[debugger] Connecting debugger on named pipe: "/tmp/cmake-debugger-pipe-b6afcaa0-c6f1-460a-a1a3-dd1e94b7fbf1"

https://github.com/microsoft/vscode-cmake-tools/assets/101234795/26d51ee5-64cc-4fe0-bd0b-b74b33074b1f

Yingzi1234 avatar May 31 '24 03:05 Yingzi1234

@Ryanf55 @gcampbell-msft We can reproduce this issue on latest version, you can get the details below.

ENV: VSCode: 1.89.1 CMake tools: v1.19.0(pre-release) C/C++: v1.20.5

Repro steps:

  1. Open this project Test.zip with VSCode
  2. Click F1 to run "CMake: configure" command
  3. Open CMakeLists.txt file and set a breakpoint in it
  4. Click F1 to run "CMake: Configure with CMake Debugger" command
  5. Re-run "CMake: Configure with CMake Debugger" command

Expected result: It should debug successfully

Actual result: The debug failed.

Output window:

main] Configuring project: Test 
[proc] Executing command: /usr/local/bin/cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++ --no-warn-unused-cli -S/Users/beyondtest/Desktop/Test -B/Users/beyondtest/Desktop/Test/build -G Ninja --debugger --debugger-pipe /tmp/cmake-debugger-pipe-b6afcaa0-c6f1-460a-a1a3-dd1e94b7fbf1
[cmake] Not searching for unused variables given on the command line.
[cmake] Running with debugger on.
[cmake] Waiting for debugger client to connect...
[debugger] Connecting debugger on named pipe: "/tmp/cmake-debugger-pipe-b6afcaa0-c6f1-460a-a1a3-dd1e94b7fbf1"
[cmake] Debugger client connected.
[cmake] CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
[cmake]   cmake_minimum_required called with unknown argument "version".
[cmake] 
[cmake] 
[cmake] CMake Warning (dev) at CMakeLists.txt:2 (project):
[cmake]   cmake_minimum_required() should be called prior to this top-level project()
[cmake]   call.  Please see the cmake-commands(7) manual for usage documentation of
[cmake]   both commands.
[cmake] This warning is for project developers.  Use -Wno-dev to suppress it.
[cmake] 
[proc] The command: pgrep -P 33473 exited with code: 1
[proc] The command: /usr/local/bin/cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++ --no-warn-unused-cli -S/Users/beyondtest/Desktop/Test -B/Users/beyondtest/Desktop/Test/build -G Ninja --debugger --debugger-pipe /tmp/cmake-debugger-pipe-b6afcaa0-c6f1-460a-a1a3-dd1e94b7fbf1 exited with code: null and signal: SIGINT
[debugger] Connecting debugger on named pipe: "/tmp/cmake-debugger-pipe-b6afcaa0-c6f1-460a-a1a3-dd1e94b7fbf1"

Screen.Recording.2024-05-31.at.10.15.28.AM.mov

Yep, that's exactly it. Good documentation and video. Hopefully this helps the team trace down a fix!

Ryanf55 avatar May 31 '24 04:05 Ryanf55

@Ryanf55 @gcampbell-msft @qarni This issue has been fixed on latest pre-release version v1.19.17, you can get the details below. Thank you! issue3582

Yingzi1234 avatar Jul 10 '24 07:07 Yingzi1234