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.
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.