Export (0) Print
Expand All

Sys.Debug traceDump Method

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

Sys.Debug.traceDump(object, name);

object

The object to dump.

name

(Optional) The name of the object.

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

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 + ".");
}


Community Additions

Show:
© 2015 Microsoft