Sys.Debug trace Method
Appends a text line to the debugger console and to the TraceConsole<textarea> element, if available.
Syntax
Arguments
-
text
-
The text to display.
Remarks
Debugging behavior, requirements, and the output of trace messages vary with different browsers. For more information, see ASP.NET AJAX Debugging and Tracing Overview
Example
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.
CS
function btnTrace_onclick() {
v = form1.text1.value;
Sys.Debug.trace("Name set to " + "\"" + v + "\".");
alert("Hello " + v + ".");
}
VB
function btnTrace_onclick() {
v = form1.text1.value;
Sys.Debug.trace("Name set to " + "\"" + v + "\".");
alert("Hello " + v + ".");
}