Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to find out which file contains a javascript function

Tags:

javascript

I've taken over a project which involves a lot of javascript (AJAX and whatnot). In tracking down functions, is there a way to find out which included .js file contains a specific function?

I'm hunting through Firebug but can't find where it isolates the specific file which contains the javascript function. What am I missing?

like image 475
user965641 Avatar asked Feb 23 '23 21:02

user965641


2 Answers

The Web Developer plugin (for FF and Chrome http://chrispederick.com/work/web-developer/) has a "View JavaScript" feature that shows all of the JS that a page is referencing on a single page. CTRL-F from there to find the function.

like image 94
RyanW Avatar answered Feb 25 '23 09:02

RyanW


Fiddler will let you search through all requests, so you could load the page in Fiddler, then search for your function.

http://www.fiddler2.com/fiddler2/

like image 36
BNL Avatar answered Feb 25 '23 09:02

BNL