Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Catch2 doesn't allow inline debugbreaks #1279
In Catch 1.0, by default if you had debug breaks enabled they would be in-lined using macros so they appeared in the same stack frame on the line of the failed assertion. Then if you enabled
In Catch 2.0, only the fast-compile codepath exists in this respect, there is no way to have debug breaks on the same line. This was changed in 9329d97. I agree that it's likely a better default, but for me I'd like to have a way to opt back in. It's significantly nicer to have the debugger stop directly on a failed assertion instead of having to always switch up the stack frame, especially if you care about multiple assertions.
I hacked something up locally just by adding a
Note: Regardless of whether this is implemented the docs should be updated, since at the moment the docs for
For what it's worth I don't run with the
I prefer having the breaks happen actually on the failed checks otherwise it's busy work every time a check fails to click back on the right stack frame. I realise it's a trade-off against compile time but it's one I'll happily make for a smoother experience.