Re: Debugger not stopping at hard breakpoint in xul javascript.

James Ross <[email protected]>
Newsgroups gmane.comp.mozilla.devel.jsdebugger
Message-ID <[email protected]>
Dennis Muhlestein wrote:
> Is there some special circumstance that deals with breakpoints inside of 
> event handler code?

Venkman does nothing special, and if anything special is needed it's a 
bug in the underlying JavaScript engine or (more likely) DOM code that 
is pissing about with the event.

I have never had any problem setting a hard breakpoint in script files 
in extensions.

There is one technique that will always work, although I rarely need to 
employ it:

- Place the 'debugger' statement in the code where you wish to break. 
You can put it inside its own if, or wherever ever you'd like to stop.
- Make sure Pretty Print is turned on in Venkman.
- Run the code.

The 'debugger' statement will force the JavaScript engine to break into 
the debugger (i.e. Venkman) if it is open. Pretty Print will avoid any 
issues where DOM/JavaScript engine are returning mismatching line 
numbers (commonly a problem for inline event handlers, but can occur in 
other places).

-- 
James Ross <[email protected]>
ChatZilla and Venkman Developer
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.