Get the full call stack trace of $http calls

后端 未结 3 885
不思量自难忘°
不思量自难忘° 2021-02-05 09:03

Let\'s say someone wrote a method like this in a file called app.js trying to peform an XHR request angainst a non existing url:

app.controller(\'Ma         


        
3条回答
  •  独厮守ぢ
    2021-02-05 09:53

    XHR requests are stacked in $http.pendingRequests array and are send later. Which is why you can't find a direct linked between where $http is called and where the actual XHR request is made.

    If you want to know which function called $http you have to set a breakpoint in $http function.

    It kinds of defeat the whole "XHR breakpoints" purpose in my opinion.

提交回复
热议问题