Loupe - Log - Monitor - Resolve
Gibraltar.Monitor Namespace / Log Class / DebugBreak Method

In This Topic
    DebugBreak Method (Log)
    In This Topic
    Automatically stop debugger like a breakpoint, if enabled.
    Syntax
    'Declaration
     
    
    <ConditionalAttribute("DEBUG")>
    Public Shared Sub DebugBreak() 
    [Conditional("DEBUG")]
    public static void DebugBreak()
    Remarks
    This will check the state of Log.BreakPointEnable and whether a debugger is attached, and will breakpoint only if both are true. This should probably be extended to handle additional configuration options using an enum, assuming the basic usage works out. This method is conditional upon a DEBUG build and will be safely ignored in release builds, so it is not necessary to wrap calls to this method in #if DEBUG (acts much like Debug class methods).
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also