I'm trying to debug a lengthy script, which breaks down some time after the execution started. Debugging it in firebug step-by-step is a nightmare.

FlowTrace does a good job of showing me the function calls, but having line-by-line execution information on the script would be invaliable.

Is there any way I could collect (and store) this information in firebug or by using firefoxes api?