如何确定导致404错误的行? [英] How can I determine what line is causing a 404 error?
本文介绍了如何确定导致404错误的行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这个调用在JavaScript控制台中看起来像这样。
GET some_path / undefined 404(未找到)
,它所有的权限就是:
undefined:1
它一遍又一遍地重复,它不会停止。如何确定哪个线路正在尝试拨打电话?
解决方案
在chrome上,您可以在XHR上添加断点,然后应该看到callstack。
转到开发人员工具 - >源选项卡 - >XHR断点,并添加相关URL过滤的断点
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?
解决方案
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
这篇关于如何确定导致404错误的行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文