xdebug://debug-eval中未捕获的异常'ErrorException' [英] Uncaught exception 'ErrorException' in xdebug://debug-eval

查看:57
本文介绍了xdebug://debug-eval中未捕获的异常'ErrorException'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用

Intellij 14.1.4,PHP v5.5.38,Xdebug v2.2.3

Intellij 14.1.4, PHP v5.5.38, Xdebug v2.2.3

我进行了更改,该更改定义了php $ GLOBALS ['CRED_TYPE']变量.我稍后删除了该变量.我检查了所有地方,并且不再在任何地方定义此变量.它只是在我的代码中不存在.

I made a change which was defining a php $GLOBALS['CRED_TYPE'] variable. I removed that variable later. I checked everywhere and this variable is not defined anywhere anymore. It just not there in my code.

但是由于某些原因,我仍然遇到以下问题

But for some reason i am still getting the following problem

(!)致命错误:第1行的xdebug://debug-eval中出现消息未定义索引:CRED_TYPE"的未捕获异常'ErrorException'(!)ErrorException:未定义的索引:第1行的xdebug://debug-eval中的CRED_TYPE

( ! ) Fatal error: Uncaught exception 'ErrorException' with message 'Undefined index: CRED_TYPE' in xdebug://debug-eval on line 1 ( ! ) ErrorException: Undefined index: CRED_TYPE in xdebug://debug-eval on line 1

我什至重新克隆了整个项目,但是每当我尝试调试它时,它就会迷路(崩溃),有时我会收到此异常.这应该不存在,因为没有这样的代码,但是我为什么要得到这个.

I even recloned the whole project, but whenever i try to debug it just get lost (crashed) and sometime i get this exception. This should not be there, as there is no such code, but why am i getting this.

也没有对文件的追溯.我不知道该怎么办,请问有什么主意吗?

There is no traceback to the file either. I don't know what to do, any ideas please?

推荐答案

解码错误消息的关键是失败代码的位置:第1行上的 xdebug://debug-eval .它不是文件,而是由调试器动态生成和评估的代码.

The key for decoding the error message is the location of the failing code: xdebug://debug-eval on line 1. It is not a file but code that is dynamically generated and evaluated by the debugger.

每次将脚本停止进入调试器时,调试器客户端(PhpStorm,NetBeans等)都会向 xdebug PHP扩展(调试器服务器组件)发送一个 eval()命令用于每个监视的表达式.该代码在代码的当前范围内运行(脚本已停止).

Every time the script is stopped into the debugger, the debugger client (PhpStorm, NetBeans etc.) sends to the xdebug PHP extension (the debugger server component) one eval() command for each watched expression. This code runs in the current scope of the code (where the script is stopped).

由于没有 $ CRED_TYPE 全局变量,因此对表达式 $ GLOBALS ['CRED_TYPE'] 求值会产生一条提示(未定义的索引:CRED_TYPE'"),然后由您的项目设置的自定义错误处理程序会生成并引发 ErrorException .没有捕获到异常,脚本异常结束.

Since there is no $CRED_TYPE global variable, evaluating the expression $GLOBALS['CRED_TYPE'] produces a notice ("Undefined index: CRED_TYPE'") and the custom error handler set by your project generates and throws an ErrorException from it. The exception is not caught and the script ends abnormally.

确保调试器的监视"窗口中的表达式列表不包含在放置断点的代码范围内无效的表达式.

Make sure the list of expressions in the Watch window of your debugger does not contain expressions that are not valid in the scope of the code where you put a breakpoint.

这篇关于xdebug://debug-eval中未捕获的异常'ErrorException'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆