【问题标题】:xdebug 2.4.0 php7.0, crash after breakpointxdebug 2.4.0 php7.0,断点后崩溃
【发布时间】:2016-07-02 19:01:56
【问题描述】:

我在调试 php 页面时遇到问题。 当我设置断点时,调试器停止在线,但是当我单击 f8、f7 或 f5 继续时,调试器崩溃。

然后我在浏览器的输出中看到断点之前发送的内容。 如果我没有设置断点,页面将被正确处理。

我正在使用:

库本图 16.04

xdebug 2.4.0

PHP 版本 7.0.8-3+deb.sury.org~xenial+1

netbeans 8.1

这是我在 php.ini 中的 xdebug 部分

[XDebug]
zend_extension = "/usr/lib/php/20151012/xdebug.so"

xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.profiler_enable=1
xdebug.profiler_output_dir="\tmp"
xdebug.idekey=XDEBUG_IDEKEY
xdebug.remote_autostart=1
xdebug.collect_params=1
xdebug.remote_host=localhost
xdebug.remote_mode=req
xdebug.remote_handler=dbgp
xdebug.remote_connect_back=1
xdebug.max_nesting_level=200
xdebug.var_display_max_depth=1000
xdebug.var_display_max_children=256
xdebug.var_display_max_data=4096
request_terminate_timeout=600s

我在php.ini中尝试了几种不同的配置,总是同样的问题。

如果将我的 phpinfo() 粘贴到 https://xdebug.org/wizard.php 结果是:

您已经在运行最新的 Xdebug 版本

有人知道吗?

编辑。

我添加了一个错误处理程序;打印此输出:

Error: [8] Undefined variable: resq - xdebug://debug-eval:1
Terminating PHP Script

在我调用的错误处理程序内部:

debug_print_backtrace();

那个印刷品:

#0 handleError(8, Undefined variable: resq, xdebug://debug-eval, 1, Array ([_GET] => Array ([XDEBUG_SESSION_START] => netbeans-xdebug),[_POST] => Array (),[_COOKIE] => Array ([__utma] => 111872281.1893580102.1409742196.1409912396.1409912582.6,[_ga] => GA1.1.1893580102.1409742196,[HstCfa2834198] => 1442332630459,[HstCla2834198] => 1442821794939,[HstCmu2834198] => 1442332630459,[HstPn2834198] => 15,[HstPt2834198] => 51,[HstCnv2834198] => 5,[HstCns2834198] => 10),[_FILES] => Array (),[_ENV] => Array (),[_REQUEST] => Array ([XDEBUG_SESSION_START] => netbeans-xdebug),[_SERVER] => Array ([HTTP_HOST] => localhost,[HTTP_USER_AGENT] => Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0,[HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8,[HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.5,[HTTP_ACCEPT_ENCODING] => gzip, deflate,[HTTP_COOKIE] => __utma=111872281.1893580102.1409742196.1409912396.1409912582.6; _ga=GA1.1.1893580102.1409742196; HstCfa2834198=1442332630459; HstCla2834198=1442821794939; HstCmu2834198=1442332630459; HstPn2834198=15; HstPt2834198=51; HstCnv2834198=5; HstCns2834198=10,[HTTP_CONNECTION] => keep-alive,[PATH] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin,[SERVER_SIGNATURE] =>
Apache/2.4.18 (Ubuntu) Server at localhost Port 80
,[SERVER_SOFTWARE] => Apache/2.4.18 (Ubuntu),[SERVER_NAME] => localhost,[SERVER_ADDR] => 127.0.0.1,[SERVER_PORT] => 80,[REMOTE_ADDR] => 127.0.0.1,[DOCUMENT_ROOT] => /var/www/html,[REQUEST_SCHEME] => http,[CONTEXT_PREFIX] => ,[CONTEXT_DOCUMENT_ROOT] => /var/www/html,[SERVER_ADMIN] => webmaster@localhost,[SCRIPT_FILENAME] => /var/www/html/fierart/index.php,[REMOTE_PORT] => 36736,[GATEWAY_INTERFACE] => CGI/1.1,[SERVER_PROTOCOL] => HTTP/1.1,[REQUEST_METHOD] => GET,[QUERY_STRING] => XDEBUG_SESSION_START=netbeans-xdebug,[REQUEST_URI] => /fierart/index.php?XDEBUG_SESSION_START=netbeans-xdebug,[SCRIPT_NAME] => /fierart/index.php,[PHP_SELF] => /fierart/index.php,[REQUEST_TIME_FLOAT] => 1467579745.269,[REQUEST_TIME] => 1467579745))) called at [xdebug://debug-eval:1] #1 unknown() called at [/var/www/html/fierart/index.php:24] 

感谢您的帮助。

【问题讨论】:

  • xdebug.profiler_output_dir="\tmp" 是错误的,但我认为这不是问题
  • 事实上,关闭分析器再试一次:xdebug.profiler_enable=0
  • 感谢您的回复,我尝试删除 profiler_output_dir 并设置 profiler_enable= 0。没有改变

标签: php netbeans xdebug


【解决方案1】:

我解决了找到这个话题

Call to a member function getAction() on a non-object

问题是一样的:

“我的观察列表中有一个不再使用的表达式”

【讨论】:

  • 我用我认为是帖子中的解决方案编辑了这个答案,但我认为这只是一个问题附录 - 道歉。我已经恢复了。
猜你喜欢
  • 1970-01-01
  • 2011-09-10
  • 2016-10-19
  • 1970-01-01
  • 1970-01-01
  • 2020-03-14
  • 2017-02-22
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多