With the Debug object, you can send messages to the output window of the opened script debugger in Internet Explorer.
Note: the script debugging applications can also be opened with the debugger statement directly.
The Debug object supports the write and writeln methods to send messages to the output window of the opened script debugger.
To send messages to a console in Firefox, use the reportError method for the Error Console and the dump method for the Console window. In Opera, use the postError method for the Error Console.
Sending a message to the output window of the debugger:
The Debug object inherits from the Object.prototype object. The following list only contains the members of the Debug object.
|write ([message1 [, message2 [, ... [, messageN]]]])||
Sends messages to the script debugger.
|writeln ([message1 [, message2 [, ... [, messageN]]]])||
Sends messages to the script debugger, followed by a newline character.
Sending message to the console:
User Contributed Comments