Skip to content

CMake+MinGW+Clang not start cppdbg debugger #3667

Open
@WittonBell

Description

@WittonBell

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 <stdio.h>

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})
  1. switch kit [Clang 18.1.1 x86_64-w64-windows-gnu(mingw64)] from VSCode status bar for cmake-tools
  2. click debug button from VSCode status bar for cmake-tools
    image
  3. cmake-tools will start the cppvsdbg debugger, not cppdbg
    image
    image

so, it does not hit the breakpoint when debugging.

image

switch kit to gcc, it start the cppdbg debugger correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature: debug/launchbuga bug in the productmore info neededMore info is needed from the community for us to properly triage and investigate.

    Type

    No type

    Projects

    Status

    Pending Prioritization

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions