How can I determine what line is causing a 404 error?

谁说我不能喝 提交于 2019-12-25 07:39:36

问题


I have a terrible repeating error of 404 not found for a GET request.

The call looks like this in the JavaScript console

GET some_path/undefined 404 ( Not Found )

and all it states to the right of that is:

undefined:1

It keeps repeating over and over, it does not stop. How can I determine what line is trying to make this call?


回答1:


On chrome you can add breakpoints on XHR and then you should see the callstack. Go to developer tools -> "sources" tab -> "XHR Breakpoints" and add a breakpoint filtered by the relevant URL



来源:https://stackoverflow.com/questions/34142255/how-can-i-determine-what-line-is-causing-a-404-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!