Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Sys.Debug trace Method

Appends a text line to the debugger console and to the trace console, if available.

Sys.Debug.trace(text);
text

The text to display.

You can create a trace console on a Web page by adding a textarea element and setting its id attribute set to "Trace Console".

Debugging behavior, requirements, and the output of trace messages vary with different browsers. For more information, see Debugging and Tracing Ajax Applications Overview

The following example shows a click handler function that writes a line to the trace console. The example assumes the existence of an HTML element named Text1 in the default form element of the page. This is part of a larger example from the Sys.Debug class overview.


function btnTrace_onclick() {
    v = form1.text1.value;
    Sys.Debug.trace("Name set to " + "\"" + v + "\".");
    alert("Hello " + v + ".");
}


Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.