Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome Developer Tools to determine where in code a REST call executed?

I've recently been put on front-end duty, and find myself a little out of my element in terms of the functionality of the Chrome Developer Tools. I tried a little google'ing but didn't find an answer to the following:

Is there some way to determine where among my open JavaScript sources a REST-call originated/executed from?

Like, is there some way to obtain the file/line (or both) that can point me to where the GET/POST/whatever command was fired?

like image 215
ViRALiC Avatar asked Oct 20 '25 03:10

ViRALiC


2 Answers

You can debug the rest api calls in chrome's network tab and also filter the request as per the status code and you can also check the headers as well as the request parameters that you are sending with request.

enter image description here

like image 126
kailash yogeshwar Avatar answered Oct 21 '25 18:10

kailash yogeshwar


Guess this question was already asked but in a different way in this SO Question

As per the linked question, we just need to hover over the link in the Initiator section of the Network tab, and it shows the complete stack, from which it should be easy to get the line number :) Tried it and it is working.

like image 23
Keerthi Kumar P Avatar answered Oct 21 '25 16:10

Keerthi Kumar P



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!