如何调试500错误的Ajax响应错误、Ajax

2023-09-10 21:15:22 作者:陪伴是最长情的告白

我试图调试零星的500错误填写表格的部分在我的网站的时候,用户偶尔会。每当它发生,我试着重新创建自己的环境,并填写表格,正是因为他们所做的一切,但永远无法重现的问题。我检查我的应用程序日志,我使用的框架,但他们报告任何相关的错误。我希望有人在这里也许能帮助我抓住这一点。这是在500错误有时发生,这将触发错误,用户报告:

I'm trying to debug a sporadic 500 error which users occasionally get when filling out form sections on my site. Whenever it happens, I try to recreate their environment and fill out the form exactly as they have done, but can never recreate the issue. I have checked my application logs for the framework I am using, but they report nothing related to the error. I'm hoping someone here might be able to help me catch this. This is where the 500 error is sometimes happening and this triggers the error which users report:

//In jquery AJAX function, which submits data to PHP form for processing
error: function(data,transport){ 
$.validationEngine.debug("error in ajax response: "+data.status+" "+transport) 
}

有没有办法让我试试,赶上确切的错误是什么吗?

Is there a way for me to try and catch what the exact error is here?

推荐答案

据AJAX只是读取服务器响应状态,并不会创建它,你应该阅读error.log中。作为有用的信息,你可以看看萤火虫用于发送数据。

As far as AJAX just reads server response status and doesn't create it, you should read for 'error.log'. As useful info you can look into firebug for sending data.