> On 5 Jan 2022, at 11:03, Daniel Ruoso via SG15 <sg15@lists.isocpp.org> wrote:
> I think this is a crucial point.
>
> It's not clear to me what a breakpoint outside of a debugger would do.
I would expect that it does nothing, or perhaps that the behaviour is implementation-defined. In practice, I’d probably define an assertion macro where I do some logging, then check if (std::is_debugger_attached) and then do std::breakpoint if true.
If this is not the intended use, I’d be curious to hear what one should do instead.
Sounds about right. UE4 does something similar with its logging macros. But it only does the is_debugger_attached+breakpoint for the "Error" level and above.
--