write Method (Windows Scripting - JScript)

 

Sends strings to the script debugger.

Syntax

Debug.write([str1 [, str2 [, ... [, strN]]]])

Arguments

  • str1, str2, ... , strN
    Optional. Strings to send to the script debugger.

Remarks

The write method sends strings to the Immediate window of a script debugger at run time. If the script is not being debugged, the write method has no effect.

The write method is almost identical to the writeln method. The only difference is that the writeln method sends a newline character after the strings are sent.

This example uses the write method to display the value of the variable in the Immediate window of the script debugger.

Note

To run this example, you must have a script debugger installed and the script must run in debug mode.

Internet Explorer 8 includes the Microsoft JScript debugger. If you are using an earlier version of Internet Explorer, see How to: Enable and Start Script Debugging from Internet Explorer.

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

Requirements

Version 3

Applies To: Debug Object (Windows Scripting - JScript)

Change History

Date

History

Reason

March 2009

Modified note about script debugger.

Content bug fix.

See Also

writeln Method (Windows Scripting - JScript)