This article covers features introduced in SpiderMonkey 1.8.6
hit() method is called when the breakpoint is reached. You should implement your breakpoint handler to perform whatever tasks you'd like to handle when a breakpoint occurs.
You can use a single breakpoint handler for multiple breakpoints, or have different handlers for different breakpoints. This lets you have the same (or different) behavior as you see fit, allowing the creation of multiple types of breakpoints.
You can set as many breakpoints as you like at a single location. When execution reaches that point, SpiderMonkey calls all of the breakpoint handlers, one after another. The order in which they get called is unspecified and must not be relied upon.
Calls to breakpoint handlers are cross-compartment, intra-thread calls.
These methods must be called with a
this value referring to the
| ||Resumption value||Called when the breakpoint is reached, before executing the code at the offset at which the breakpoint was set.|
Called when a breakpoint was reached, before executing the corresponding bytecode.
hit( frame );
Debugger.Frameinstance representing the currently executing stack frame. You can get all the information you need to handle the breakpoint from this object.
Return a resumption value indicating how execution of the script should proceed.