Why are my breakpoints not hit in CLion?

mstrap picture mstrap · Mar 9, 2016 · Viewed 18.7k times · Source

I'm trying to debug an executable which has been created with CMake configuration

SET(CMAKE_BUILD_TYPE Debug)

However, CLion does not hit any breakpoints. What could be the problem?

Answer

Michael Mairegger picture Michael Mairegger · Jul 7, 2016

I had the same issue today. I figured out that the configuration for the project was not set to Debug. After setting the configuration to Debug all the breakpoints are hit.

Please ensure that you have following configuration:

  • Select the MenuItem Run/EditConfigurations
  • Select the right Target
  • Select Debug as Configuration

Now the breakpoints should be hit.