question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"CMake: Debug" command freezes on launch

See original GitHub issue

Brief Issue Summary

I am trying to use the debug feature of CMake Tools. When i try to use it it freezes on “Executing command: /usr/bin/lldb --version”

Expected:

  1. Run “CMake: Debug” command
  2. Normal debug session

Apparent Behavior:

  1. Run “CMake: Debug” command
  2. The VSCode red line activity indicator moves left to right indefinitely.

CMake Tools Log

[build] Starting build
[proc] Executing command: /opt/local/bin/cmake --build /Users/griswold/project/schemin-c/build --config Debug --target schemin -- -j 14
[build] [ 80%] Built target utf8proc
[build] [100%] Built target schemin
[build] Build finished with exit code 0
[proc] Executing command: /usr/bin/lldb-mi --version
[proc] Executing command: /usr/bin/gdb --version
[proc] Executing command: /usr/bin/lldb --version
[proc] Executing command: /usr/bin/lldb --version

Developer Tools Log

console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:27.694Z [debug] [extension] [8716] cmake.debugTarget started
console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:27.744Z [debug] [main] Run build schemin
console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:27.759Z [debug] [main] Saving open files before configure/build
console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:27.778Z [info] [build] Starting build
console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:27.791Z [debug] [driver] Start build schemin
console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:27.792Z [debug] [driver] Runnnig pre-configure checks and steps
console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:27.793Z [info] [proc] Executing command: /opt/local/bin/cmake --build /Users/griswold/project/schemin-c/build --config Debug --target schemin -- -j 14
console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:27.932Z [info] [build] [ 80%] Built target utf8proc
console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:27.985Z [info] [build] [100%] Built target schemin
console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:28.008Z [debug] [driver] Run _refreshExpansions
console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:28.008Z [debug] [cms-driver] Run doRefreshExpansions
console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:28.008Z [debug] [driver] Run _refreshExpansions cb
console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:28.013Z [info] [build] Build finished with exit code 0
console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:28.015Z [debug] [cache] Reading CMake cache file /Users/griswold/project/schemin-c/build/CMakeCache.txt
console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:28.020Z [debug] [cache] Parsing CMake cache string
console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:28.031Z [info] [proc] Executing command: /usr/bin/lldb-mi --version
console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:28.037Z [debug] [cache] Reading CMake cache file /Users/griswold/project/schemin-c/build/CMakeCache.txt
console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:28.041Z [debug] [cache] Parsing CMake cache string
console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:28.058Z [info] [proc] Executing command: /usr/bin/gdb --version
console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:28.067Z [info] [proc] Executing command: /usr/bin/lldb --version
console.ts:137 [Extension Host] updateCustomBrowseConfiguration
console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:28.104Z [info] [proc] Executing command: /usr/bin/lldb --version
console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:28.140Z [debug] [main] Debug configuration from cache: {"type":"cppdbg","name":"Debug schemin","request":"launch","cwd":"${workspaceFolder}","args":[],"MIMode":"lldb","miDebuggerPath":"/usr/bin/lldb","program":"/Users/griswold/project/schemin-c/build/schemin"}
console.ts:137 [Extension Host] [CMakeTools] 2019-12-23T17:33:28.140Z [debug] [main] Starting debugger with following configuration. {"workspace":"file:///Users/griswold/project/schemin-c","config":{"type":"cppdbg","name":"Debug schemin","request":"launch","cwd":"${workspaceFolder}","args":[],"MIMode":"lldb","miDebuggerPath":"/usr/bin/lldb","program":"/Users/griswold/project/schemin-c/build/schemin"}}

Platform and Versions

  • Operating System: macOS Catalina 10.15.2 (19C57)
  • CMake Version: 3.16.1
  • VSCode Version: 1.41
  • CMake Tools Extension Version: 1.2.3
  • Compiler/Toolchain: xcode command-line tools clang

Other Notes/Information

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
bobbrowcommented, Dec 23, 2019

cpptools is still working on creating a redist of lldb-mi now that it’s removed from distribution. https://github.com/microsoft/vscode-cpptools/issues/3829

0reactions
bobbrowcommented, Aug 29, 2022

I believe this issue was addressed, but never closed. If you are still having issues, please let us know.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[CMake] VS 2019 hangs with "initializing debugger" for "Linux ...
I installed the remote WSL extension. That works great (just connect over SSH). Sometimes I open a terminal inside vscode to use custom...
Read more >
what to do if debug runs fine, but release crashes
To rule out the former, try redefining assert as an empty operation in the debug build. If the absence of some assertion causes...
Read more >
Random crashes when linking with msvc 2015 (#21145) · Issues
We face random crashes in cmake. The crashes are random and not reproducible. The issue mainly happens in CI due to large number...
Read more >
CMake Tutorial — CMake 3.16.9 Documentation
Navigate to the directory where Tutorial was built (likely the make directory or a Debug or Release build configuration subdirectory) and run these...
Read more >
Crash starting app after upgrade to Monterey - Apple Developer
I suspect the issue is related to the framework entries in our CMakeLists.txt file. I was originally seeing some log4cxx initialization items in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found