Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

Add a feature gate to call DebugBreak on construction #298

Open
AqlaSolutions opened this issue Dec 7, 2020 · 0 comments
Open

Add a feature gate to call DebugBreak on construction #298

AqlaSolutions opened this issue Dec 7, 2020 · 0 comments

Comments

@AqlaSolutions
Copy link

On Windows, when appropriate feature is enabled, it would be cool to be able to run this kind of code when constructing a Error struct:

    if (unsafe { winapi::um::debugapi::IsDebuggerPresent() != 0 })
    {
         unsafe { winapi::um::debugapi::DebugBreak(); }
    }

It would cause the debugger, if attached, to break at the time of error construction so it's possible to see the stack locals and even interact with things.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant