Catch2 doesn't allow inline debugbreaks
- Dominant language
- C++
- Stars
- 21.5k
- Forks
- 3.5k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 2
Description
## Description
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 `CATCH_CONFIG_FAST_COMPILE` it would turn that off and make the debugbreak happen in a function one stack frame away.
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 9329d97a43b36aa2499ac1bc1e7ed78815ca2584. 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 `CATCH_CONFIG_INLINE_DEBUG_BREAK` which moves `catch_debugger.h` up into the public section, and calls `CATCH_BREAK_INTO_DEBUGGER` from `INTERNAL_CATCH_REACT` if breaks are enabled.
**Note:** Regardless of whether this is implemented the docs should be updated, since at the moment the docs for [`CATCH_CONFIG_FAST_COMPILE`](https://github.com/catchorg/Catch2/blob/master/docs/configuration.md#catch_config_fast_compile) still mention the old inlined debug break behaviour as the default which is inaccurate.
### Extra information
* Catch version: **v2.2.2**
* Operating System: Windows 7
* Compiler+version: MSVC 2015
Contributor guide
Assessment
This issue has not been assessed yet.