O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Debugger

Synopsis

This class enables you to control the debugger from the debugged code. If a debugger is executing your code, IsAttached returns true. Break() sets a breakpoint and causes the debugger to pause. Log() logs output to the debugger window. The Launch() method launches the debugger and attaches it to your process, returning true if successful or if the debugger is already attached. Launch() returns false if the debugger could not be attached.

public sealed class Debugger {
// Public Constructors
   public method Debugger();  
// Public Static Fields
   public static readonly field string DefaultCategory;  
// Public Static Properties
   public static field bool IsAttached{get; } 
// Public Static Methods
   public static method void Break();  
   public static method bool IsLogging();  
   public static method bool Launch();  
   public static method void Log(int level, string category, 
        string message);  
}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required