debug()

NES2+Syntax

debug(expression)
debug(variable)

Description

The debug function is a top-level function that is not associated with any core object. This function is used to display the value of an expression or variable in the Trace Information window when running the application in the JavaScript Application Manager's debug window.

Example

Listing 8.68, when run in the JavaScript Application Manager's debugger, will display the value of the request.name when encountered.

Listing 8.68 Using the debug() Function to Write Information to the Trace Information Window
<SERVER>

// Display the value of the name passed in the request
// to the application
debug(request.name);

</SERVER>
						

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.