0 out of 1 rated this helpful - Rate this topic

Debug Object (JavaScript)

JavaScript - Internet Explorer 10

An intrinsic global object that sends output to a debugger.

Debug.function

You do not instantiate the Debug object. You can access all its properties and methods by calling function.

There are different ways to debug Internet Explorer and Windows Store apps. In Windows Store apps, the write and writeln functions of the Debug object display strings in the Visual Studio Output window at run time. For more information about debugging Windows Store apps, see Debugging Windows Store apps.

To debug Internet Explorer scripts, you must have a script debugger installed and the script must run in debug mode. Internet Explorer 8 and later versions include the JavaScript debugger. If you are using an earlier version of Internet Explorer, see How to: Enable and Start Script Debugging from Internet Explorer.

If the script is not being debugged, the functions have no effect.

This example uses the write function to display the value of the variable.

var counter = 42;
Debug.write("The value of counter is " + counter);

Supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, Internet Explorer 10 standards. Also supported in Windows Store apps. See Version Information.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.