Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

WriteLine Method

Updated: March 2009

Sends strings to the script debugger, followed by a newline character.

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

Optional. Strings to send to the script debugger.

The WriteLine method sends strings, followed by a newline character, to the Immediate window of the Microsoft Script Debugger at run time. If the script is not being debugged, the WriteLine method has no effect.

The WriteLine method is almost identical to the Write method. The only difference is that the Write method does not send a newline character after sending the strings.

This example uses the WriteLine method to display the value of the variable in the Immediate window of the Microsoft Script Debugger.

Note 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.

Dim counter
counter = 42
Debug.WriteLine "The value of counter is " & counter

Date

History

Reason

March 2009

Modified note about script debugger.

Content bug fix.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.