Date: Sat, 15 Jan 2022 20:29:19 -0600
On Wed, Jan 5, 2022 at 5:46 AM Timur Doumler via SG15 <sg15_at_[hidden]>
wrote:
>
> > On 5 Jan 2022, at 11:03, Daniel Ruoso via SG15 <sg15_at_[hidden]>
> 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.
wrote:
>
> > On 5 Jan 2022, at 11:03, Daniel Ruoso via SG15 <sg15_at_[hidden]>
> 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.
-- -- René Ferdinand Rivera Morell -- Don't Assume Anything -- No Supone Nada -- Robot Dreams - http://robot-dreams.net
Received on 2022-01-16 02:29:32