Sys.Debug clearTrace Method

Clears all trace messages from the trace console.

Sys.Debug.clearTrace(text);

Remarks

You can create a trace console on a Web page by adding a textarea element and setting its id attribute 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.

Example

The following example shows a click handler function that clears the contents of the trace console. This is part of a larger example from the Sys.Debug class overview.

function btnClear_onclick() {
    Sys.Debug.clearTrace()
    alert("Trace console cleared.");
}
function btnClear_onclick() {
    Sys.Debug.clearTrace()
    alert("Trace console cleared.");
}

See Also

Reference

Sys.Debug Class

Concepts

Debugging and Tracing Ajax Applications Overview