debug.write function sends strings to the script debugger.
Debug.write([str1 [, str2 [, ... [, strN]]]])
str1, str2, ... , strNOptional
- Strings to send to the script debugger.
Debug.write function sends strings to the Immediate window of a script debugger at run time. If the script is not being debugged, the
Debug.write function has no effect.
Debug.write function is almost identical to the
Debug.writeln function. The only difference is that the
Debug.writeln function sends a newline character after the strings are sent.
This example uses the
Debug.write function 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.
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, Internet Explorer 11 standards. Also supported in Store apps (Windows 8 and Windows Phone 8.1).