Why are my breakpoints not hit in CLion?
In case this helps someone else, it turned out that my (somewhat embarrassing) issue was that I was hitting Run
instead of Debug
. So in the Run menu don't use the play icon, instead choose the cute bug icon instead. Choosing Run was causing it to automatically build the non-debug build so breakpoints wouldn't work. Once I started choosing the bug icon, the breakpoints worked like a charm.
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
asConfiguration
Now the breakpoints should be hit.