Can't debug in Visual Studio Code
See original GitHub issueBrief Issue Summary
Can’t make the Visual Studio Code debugger work.
Expected:
- Run
CMake Configuration
The result:
[cmake] Configuring done
[cmake] CMake Deprecation Warning:
[cmake] The 'cmake-server(7)' is deprecated. Please port clients to use the
[cmake] 'cmake-file-api(7)' instead.
[cmake]
[cmake]
[cmake] Generating done
- Select Clang 11.0
- Allow
IntelliSense for this folder
- Build
The result:
[build] Starting build
[proc] Executing command: /usr/local/bin/cmake --build /Users/xxx/Desktop/cmake/hello/build --config Debug --target all -- -j 6
[build] Scanning dependencies of target say-hello
[build] [ 25%] Building CXX object CMakeFiles/say-hello.dir/hello.cpp.o
[build] [ 50%] Linking CXX static library libsay-hello.a
[build] [ 50%] Built target say-hello
[build] Scanning dependencies of target hello
[build] [ 75%] Building CXX object CMakeFiles/hello.dir/main.cpp.o
[build] [100%] Linking CXX executable hello
[build] [100%] Built target hello
[build] Build finished with exit code 0
- Set the break point and run Debug
Apparent Behavior:
- It seems the editor hangs
- The information in
Output
[build] Starting build
[proc] Executing command: /usr/local/bin/cmake --build /Users/xxx/Desktop/cmake/test/build --config Debug --target hello -- -j 6
[build] [ 50%] Built target say-hello
[build] [100%] Built target hello
[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
Platform and Versions
- Operating System: macOS 10.15
- CMake Version: 3.15.5
- VSCode Version: 1.40.2
- CMake Tools Extension Version: 1.2.3
- Compiler/Toolchain: Xcode
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Debugging in Visual Studio Code
To run or debug a simple app in VS Code, select Run and Debug on the Debug start view or press F5 and...
Read more >Introduction to Debugging in Visual Studio Code
In this tutorial, we will show you how to run and debug a program in VS Code. We'll take a tour of the...
Read more >Debug C++ in Visual Studio Code
You can debug Windows applications created using Cygwin or MinGW by using VS Code. To use Cygwin or MinGW debugging features, the debugger...
Read more >Can't debug in VS Code - Stack Overflow
I'm new to VS Code, and is following the official tutorial to learn how to debug. However, it just won't work. First, the...
Read more >i cant debug in vscode c# console - Microsoft Q&A
first, you can only debug C# .net core projects. Second you need a launch file. The s code c# extension should be able...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FYI,
miDebuggerPath
can be set via thecmake.debugConfig
setting:I believe this issue was addressed but was never closed. If any of you are still having issues, we encourage you to open a new issue.