Specifications

JavaScript Debugger Modules 245
The JavaScript Debugger module API
The JavaScript Debugger module API lets you customize the way you create the debug version of
a document. You need to create a debugger module if you want to make the Dreamweaver
JavaScript Debugger work with a browser other than Netscape Navigator and Internet Explorer,
which Dreamweaver supports. You can create a module for a specialized purpose, such as
counting the number of JavaScript statements that are used in a particular document.
Note: Currently only SCRIPT tags and event handlers are parsed for instrumentation. There are some other ways to
use JavaScript in HTML documents, such as JavaScript URLs, JavaScript entities, and conditional comments, but
these methods are not currently supported.
The JavaScript Debugger module API functions are significant only in the context of module
files. Specifically, Dreamweaver automatically calls the
getStepInstrument() function if it is
defined in the module file. For any other extension file, a function named
getStepInstrument() acts as a user-defined function; you must call it explicitly.
Unlike working with functions in the main JavaScript API, you are responsible for writing the
body of each function and returning a value, if required, for the modules. For the functions in the
main API, you call and pass arguments, and Dreamweaver generates return values, if any. For the
JavaScript Debugger modules, Dreamweaver calls the functions and passes arguments to them,
and you generate return values, if any.
All the JavaScript Debugger module functions are optional. If a function is not defined, nothing
happens when Dreamweaver calls it.
getFunctionEndInstrument()
Availability
Dreamweaver 4
Description
Called after the last statement in a function declaration. If any return statements exist, this
module is called to insert instrumentation after the return value is evaluated and before the
function can return strings.
Arguments
None.
Returns
Dreamweaver expects a string that contains the JavaScript to insert at the end of the function.