I am working on a site that has loads of legacy javascript and jquery includes and there is no documentation to show what is happening when.
I have a specific proble
You can click Firebug's "Break on next" button (in the Script tab; it looks like a pause button), then push the button that you want to debug.
The next time any JavaScript code executes, Firebug will break into the debugger and show you that line of code.