Question

So, I'm working with some JS in Firefox and also working with the jetpack sdk. I am working in a JS editor, and then I run the sdk through the command line. However, when there is a bug there is no way to debug this because the JS is being run/loaded before the page and the DOM so firebug is to no avail.

Can anyone recommend a better tool for this? It is quite tedious "making educated guesses" about where errors are starting.

Was it helpful?

Solution

You might want to check out the JavaScript debugger Venkman.

It's slightly more powerful than the debugger provided by FireBug.

Here's the Venkman Walkthrough which covers the basics. Not sure why they don't link to it from the front page...go figure.

OTHER TIPS

There is no need to install Venkman or Firebug anymore, just use the built in debugger.

On Firefox 19 or later, it's possible to use the built-in JS debugger on the browser itself. Go to about:config and set the following two prefs:

devtools.chrome.enabled: true

devtools.debugger.remote-enabled: true

After you restart the browser, the Web Developer menu will contain a "Browser Debugger" entry.

(https://developer.mozilla.org/en/docs/Debugging_JavaScript)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top