8000 CMake projects are ignoring the Launch mode Run/Debug · Issue #807 · eclipse-cdt/cdt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
CMake projects are ignoring the Launch mode Run/Debug #807
Closed
@ewaterlander

Description

@ewaterlander

CMake projects are not setting cmake -DCMAKE_BUILD_TYPE=... based on the Launch mode in the LaunchBar.
If you switch Launch mode to Debug in the LaunchBar and build you get a binary without debug information, because CFLAG -g was missing. Hitting a breakpoint will show you no code.

To Reproduce
Steps to reproduce the behavior:

  1. Create a CMake project with hello world example.
  2. Set Launch mode to Debug.
  3. Build
  4. Start debug

The program will break at main, but you see no code.

Expected behavior
You see the code.

Screenshots
image

Version Information (please complete the following information):

  • OS and OS Version/extra details: Linux
  • Eclipse Version from Help -> 2024-06 (4.32)
  • CDT Version from Help -> 11.6

Additional context
I did some debug.
In CommandDescriptorBuilder.makeCMakeCommandline() a call is done to cmakeProperties.getBuildType() which always returns null.
And this is caused by the fact that the build type was never set. CMakePropertiesBean.setBuildType() is never called.

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildBuild components of CDT, anything to do with running the compiler, using Make, CMake, or any builder

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      291C
      0