I'm looking for a tool, or a command line script or firefox plugin etc.
For example, lets say I have these included in the header:
There are dozens of ways to call a function, e.g. in the
click event of an element,
eval() statements... You could be extending the prototype of an existing class in a script file... etc. Also, you could be fetching new markup through AJAX than in turn references functions from a certain include, something impossible to test for automatically without fetching the content.
Unless somebody comes up with a tool that tackles exactly this (I'm not saying it's impossible, just that it is horribly hard) I'd say working this out manually with a good IDE and search function is the best way to go about it.