Partager via


Sys.Debug traceDump Method

Dumps an object to the debugger console and to the trace console, if available.

Sys.Debug.traceDump(object, name);

Arguments

  • object
    The object to dump.

  • name
    (Optional) The name of the object.

Remarks

You can create a trace console on a Web page by adding a textarea element with its id attribute set to "TraceConsole".

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 writes an object 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 btnDump_onclick() {
    Sys.Debug.traceDump(form1.text1, "Name textbox");
    alert("Hello " + form1.text1.value + ".");
}
function btnDump_onclick() {
    Sys.Debug.traceDump(form1.text1, "Name textbox");
    alert("Hello " + form1.text1.value + ".");
}

See Also

Reference

Sys.Debug Class

Concepts

Debugging and Tracing Ajax Applications Overview