microsoft / microsoft/vscode-cmake-tools
CMake+MinGW+Clang not start `cppdbg` debugger
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 546
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 32
Description
env:
VSCode 1.87.2
c/c++ v1.19.6
CMakeTools v1.17.17
cmake 3.29
clang 18.1.1
repro step:
1. create any simple c/c++ project.
main.c:
```
#include
int main(int argc, char *argv[]) {
printf("test\n");
while (1) {
}
return 0;
}
```
CMakeLists.txt:
```
cmake_minimum_required(VERSION 3.25.0)
project(x)
add_compile_options(
-gdwarf-4
)
aux_source_directory(. SRC)
add_executable(${PROJECT_NAME} ${SRC})
```
2. switch kit `[Clang 18.1.1 x86_64-w64-windows-gnu(mingw64)]` from VSCode status bar for `cmake-tools`
3. click debug button from VSCode status bar for `cmake-tools`

4. `cmake-tools` will start the `cppvsdbg` debugger, not `cppdbg`


so, it does not hit the breakpoint when debugging.

switch kit to `gcc`, it start the `cppdbg` debugger correctly.
Contributor guide
Research direction
Reproduce the issue with the shown main.c and CMakeLists.txt, using the Clang MinGW kit and the CMake Tools debug button. Compare the debugger selected for the Clang kit with the gcc kit, then verify that the Clang configuration starts cppdbg and reaches the breakpoint instead of starting cppvsdbg.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, vscode
- Domain
- build-system, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100