I have a big project which i am new too instead of writing alert i would like to know where the call is being made from. Is there any way to trace the code line which made ajax Request in Javascript.
Asked
Active
Viewed 780 times
0
-
Use your console? All modern browsers support xmlhttp logging. Try console.log('message'); for debugging purposes. – Kevin Op den Kamp May 27 '14 at 07:48
-
if(window.console) { console.log(debug information); } if the console is not available the script will crash. so window.console checks if the console object is there and if so it uses its log function to print out debug information. – sajay May 27 '14 at 07:52
-
3Chrome dev tools \ Network \ Filter XHR \ Initiator column. Hover to see call stack. – Yury Tarabanko May 27 '14 at 08:01
-
Yury Tarabanko thanks for your reply. I can only see the url while hovering. – Shanker Paudel May 27 '14 at 08:14
-
Thanks sanjay and Kevin Op den Kamp – Shanker Paudel May 27 '14 at 08:17
-
Thanks Yury Can you post that as an answer so that i can mark it? – Shanker Paudel May 27 '14 at 08:36