Xdebug在Ubuntu 18.04,PhpStorm,Zend Framework 3上不起作用[不在断点处停止]

时间:2019-01-10 07:27:58

标签: php ubuntu zend-framework phpstorm xdebug

我将Zend Framework 3与PhpStorm结合使用,我在Ubuntu 18.04上设置了LAMP。

调试代码时,我在Chrome浏览器中打开调试图标[extension],然后在PhpStorm中打开开始侦听,然后在页面加载的位置处的主页控制器方法处设置断点,然后刷新页面以检查是否它会在断点处停止。

我不确定设置中缺少什么,无法调试代码。任何帮助深表感谢。

etc / php / 7.2 / mods-available / xdebug.ini

xdebug.show_error_trace = 1
zend_extension=/usr/lib/php/20170718/xdebug.so
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_host = 127.0.0.1
xdebug.remote_log = /tmp/xdebug_remote.log
xdebug.remote_mode = req
xdebug.remote_port = 9001
xdebug.idekey = PHPSTORM
xdebug.remote_connect_back=1

etc / php / 7.2 / apache2 / php.ini

[xdebug]
xdebug.remote_enable = 1
xdebug.remote_autostart = 1

PHP版本详细信息:

shoebaamir123@ubuntu:~$ php -v
PHP 7.2.10-0ubuntu0.18.04.1 (cli) (built: Sep 13 2018 13:45:02) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.10-0ubuntu0.18.04.1, Copyright (c) 1999-2018, by Zend Technologies
    with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

1 个答案:

答案 0 :(得分:0)

在“ Web服务器调试验证”窗口中选择“远程Web服务器”,然后根据我的评论选择您之前创建的服务器。

相关问题