【问题标题】:Eclipse with php7.0 does not stop at breakpoints after ubuntu 16 upgradeubuntu 16 升级后,带有 php7.0 的 Eclipse 不会在断点处停止
【发布时间】:2016-12-07 01:13:54
【问题描述】:

我已经研究了大约半天,仍然没有找到答案。当 Eclipse PDT 不在断点处停止时,它有很多修复。没有一个修复有效。

以下是要点:

PHP 版本 7.0.8-0ubuntu0.16.04.1

Eclipse Luna 4.4.2

Zend Engine v3.0.0,版权所有 (c) 1998-2016 Zend Technologies 使用 Zend OPcache v7.0.8-0ubuntu0.16.04.1,版权所有 (c) 1999-2016,由 Zend Technologies 提供 使用 Xdebug v2.4.0RC2,版权所有 (c) 2002-2015,作者 Derick Rethans

所以我们可以看到 xdebug 安装正确并且 phpinfo() 显示了这个。

这是我的 php.ini 的一部分

zend_extension=/usr/lib/php/20151012/xdebug.so
xdebug.profiler_output_dir="/tmp/xdebug/"
xdebug.profiler_enable=on
xdebug.remote_enable=on
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.remote_autostart=off
xdebug.remote_mode=req
xdebug.extended_info=0

更多细节:

PHP API     20151012
PHP Extension   20151012
Zend Extension  320151012
Zend Extension Build    API320151012,NTS
PHP Extension Build     API20151012,NTS

当我尝试调试 php 代码时,它会一次(正确)执行,而不会在第一行或任何断点或 xdebug_break() 处停止。

调试首选项指示 XDebug、php 7.0 和 localhost 作为服务器。路径设置正确,正如我提到的代码确实执行,它只是不会在断点处停止

我还能寻找什么?

编辑

我全新安装了 Eclipse Neon。我在 ndw 工作区中创建了一个全新的项目,其中一个 php 文件只有 3 行代码。然后,我完成了调试和服务器设置,以便在调试器停止工作之前拥有相同的服务器和调试设置。这并没有改变任何东西。

我注意到在我启动调试会话后,整个脚本正常执行,但在 Eclipse 窗口底部有一个进度,上面写着:Launching debug.test: (27%) and it stays at 27 % 和进度条来回走动。

看来问题一定和我的php配置有关,这是合乎逻辑的,因为它是在系统升级后开始的。

有谁知道 php 配置如何导致 xdebug 静默停止工作?

【问题讨论】:

    标签: php eclipse debugging xdebug


    【解决方案1】:

    问题解决了。 xdebug.so 不可执行。我修复了它:

    sudo chmod +x /xdebug.so

    我希望这对某人有用。

    【讨论】:

    • 我遇到了完全相同的问题,但这个解决方案对我不起作用。
    猜你喜欢
    • 2011-05-22
    • 2014-03-25
    • 1970-01-01
    • 2016-07-03
    • 2014-11-22
    • 2014-06-19
    • 2021-06-29
    • 2010-11-25
    • 1970-01-01
    相关资源
    最近更新 更多