Chrome DevTools: jump from XHR network request, to the code that made it
Solution 1
See the "Initiator" column in the network tab. It tells you which code initiated the AJAX call. You will also get a tooltip with a full stack trace.
Solution 2
I don't have 50 reputation to comment so I'm replying to:
If you use a library like jQuery or Angular to help you make the call, is >there a way to see the source code that called the helper functions? – >Atav32 Mar 14 at 1:01
If you want to find "real" method call then add breakpoint in line suggested by "Initiator" column and hit "Step out of current function (Shift+F11)" till you reach code you want to.
Cheers!

Dan Dascalescu
Bio Co-founded the visa-free startup ship, Blueseed, the Quantified Self Forum (a community for self-trackers), and two web startups using meteor. Former Developer Advocate at Google - Progressive Web Apps (PWA), Accelerated Mobile Pages (AMP), Chrome OS, and AR (Lens). Former localization engineer at Yahoo!. I currently discourage localization in general, for reasons I haven't seen successfully challenged since 2009, with the exception of translating basic computer programming materials as a way to onboard new developers. More about me on on Wikipedia or on my website. My CV is on StackOverflow Careers. Interests Entrepreneurship and disruptive technologies, biotech, 3D printing, brain-computer interfaces, prediction markets. Applying ~20 years of experience in software development and ~5 in the startup world in CTO roles at emergent tech companies.
Updated on June 03, 2022Comments
-
Dan Dascalescu 7 months
I want to debug a REST API and see how it's used from very complex client code. After I identify the AJAX request in the Network tab, how can I go to the code that created it?
Is this impossible?