CMake projects in Qt creator can be prepared for debugging in different ways. One possibility which does not touch the CMake file is to use the Projects configuration view. Thanks to Mirko Windhoff whose instructions pointed me at that solution:

  1. Open up the Projects view
  2. Select Add Custom Build Step
    • Command: /usr/bin/cmake (for Unices)
    • Arguments: -DCMAKE_BUILD_TYPE=Debug .
    • Working Directory: %{buildDir} (or %BUILDDIR)
  3. Make sure the new build step is executed before the call to make as CMake generates the Makefile. Shift up the build step with the buttons at the top of the box.
  4. Start debugging with F5.