Here's how to do it in Firefox and Chrome. For both, I used the jQuery W3Schools example here so you can follow exactly.
For Firefox.
Fire up an event that triggers AJAX. Open the Firebug console and click the source link.
If you wrote your own low-level AJAX function, that will be enough and lead you to your source. But since most people will use jQuery to minimize it, you will get a jquery.min.js link that doesn't help.

If you use jquery.min.js, click on the link in the console and set a breakpoint in the line specified in the link (line 6).

Now start AJAX again and it will stop at the breakpoint. Click on the stack tab and your call should be somewhere there. Click on it and it will take you to the source.

For chrome
Open the settings and enable "Log XMLHttpRequests"

Launch AJAX again and it will appear in the console. Expand it to see the stack trace.

source share