php - Xdebug 在 Ubuntu 18.04、PhpStorm、Zend Framework 3 上不工作 [不在断点处停止]
问题描述
我将 Zend Framework 3 与 PhpStorm 一起使用,我在 Ubuntu 18.04 上设置了 LAMP。
调试代码时,我在Chrome浏览器中打开调试图标[扩展],然后在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
解决方案
Select "Remote Web Server" in the "Web Server Debug Validation" window and select there a server you created earlier as per my comment.
推荐阅读
- css - chrome扩展自动将网页宽度调整为chrome窗口的全宽
- go - 如何等待垃圾收集完成?
- c++ - 将对象传递给main中的函数的问题
- python - 在 Faust 应用程序中检查 kafka 主题的存在
- nuget - .NET 5“找不到路径的一部分”
- python - 通过python连接谷歌云服务器
- python - Docker内部线程内的tqdm不显示进度条
- swift - SwiftUI:在范围内找不到“systemName”
- jquery - 使用jQuery将CSS“width”属性设置为兄弟姐妹的文本值
- c++ - 从 SSL_CTX 创建 boost asio ssl 上下文