Introduction
It's been out since 0.9 folks!
Install
Grab the extension
Setting it up
- Under Debug menu, make sure "Exclude Browser Files" is not checked.
- Under the File menu, check "Save Break/Watch Settings on Exit".
Setting Breakpoints
This is reasonably simple. On the left are your files. Here I am debugging ProxyEnable.js.
Below it are the functions within that file. Double-clicking on the filename brings up the source code on the right.
- Place your breakpoints. The dashes near the left side of the source are where you can put your breakpoints. Here I am putting a breakpoint just before the if-statement.
- Exit venkman (this will close firefox)
- Relaunch firefox with -venkman argument. For example :
/path/to/firefox -venkman --no-remote -profile /path/to/profile
Once you restart, venkman starts first and catches any breakpoints.
This is ideal when you can't use browser chrome to initiate the javascript, for example, js code that is executed on startup.
Fun
Once the debugger breaks, you have access to all the variables. So you can start investigating the problem much more effectively than with dump. You use the black window at the bottom as an interactive javascript shell.
Navigation
The buttons at the top let you go to the next line, go deeper into js functions, or continue. Try them out.
Now Code
No more excuses.
2 comments:
All hail for freedom, democracy and ghost(bug) busting!
thanks for the excellent demo of how to use venkman, i'm totally going to try it now.
Post a Comment