How to find out the piece of code that initiated ajax request

后端 未结 2 601
走了就别回头了
走了就别回头了 2021-02-07 12:03

I have MVC view, in that tens of javascript files are included. there are some ajax requests initiated from the page. I would like to know from which particular js file the call

2条回答
  •  迷失自我
    2021-02-07 12:37

    Another very good option in chrome developer tools is XHR Breakpoint. Press F12, Select the sources tab and on the right had side under XHR Breakpoint add a new conditional breakpoint condition by specifying the text you expect to find in the URL on which the ajax call is being made. It will stop on any ajax call which contains the text specified in the URL. You can give it a try on this URL (look for the heading Breakpoints on XHR)

提交回复
热议问题