Last active
May 6, 2021 10:49
-
-
Save irwiss/9b8992b81f6cb7e92d022a2085b8c6df to your computer and use it in GitHub Desktop.
Faster conditional break, acts something like assert with automatic debugger homing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[System.Diagnostics.DebuggerHidden] | |
[System.Diagnostics.Conditional("DEBUG")] | |
public static void DebuggerBreakIf(bool condition) | |
{ | |
if (condition) | |
{ | |
System.Diagnostics.Debugger.Break(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment