Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Hour 19. Debugging and Tracing in ASP.NE... > Working with the Sys.Debug Class

Working with the Sys.Debug Class

The Debug class pertaining to the Sys namespace can be used for providing tracing and debugging functionality in your applications. The Debug class contains a list of methods that can be used to define breakpoints in your scripts and handle trace output. Table 19.1 lists the members of this class.

Table 19.1. Members of the Debug Class
MemberPurpose
Sys.Debug.trace(message)Displays the message as text in the debugger console or to the TraceConsole text area.
Sys.Debug.clearTrace()Used to clear all trace information from the TraceConsole text area.
Sys.Debug.fail(message)Breaks the debugger and displays a message in the TraceConsole text area.
Sys.Debug.assert(condition, message, displayCaller)Checks whether the condition specified is false; if so, it displays a message and prompts the user to break into the debugger.
Sys.Debug.traceDump(object, name)Dumps an object to the debugger console or to the TraceConsole text area.



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial