php – Symfony 3:使用Symfony的开发服务器进行调试
在Symfony 3.3项目的开发过程中,我使用Symfony的内部服务器,如
there所示.但我无法弄清楚如何使用xdebug来调试它.我的意思是我已通过以下方式安装和配置xdebug:
apt-get install php-xdebug 我出口: export XDEBUG_CONFIG="idekey=phpstorm" 但是,当我在我的IDE中设置断点并通过that插件启用xdebug时,我仍然没有得到任何响应. 另外,我在/etc/php/7.0/mods-available/xdebug.ini上进行了以下设置 zend_extension=xdebug.so xdebug.remote_enable=On xdebug.remote_autostart=On xdebug.remote_handler=dbgp xdebug.remote_host=localhost xdebug.remote_port=9021 xdebug.remote_mode=req 我已经配置了两个PhpStorm来监听端口9021.但我仍然遇到问题,我不能让PhpStorm监听断点. 你们的伙伴们有什么想法我可以通过我的ubuntu-16.04机器解决这个问题吗? 此外,我没有成功地看过这些问题: > Xdebug configuration with PHP fastcgi and eclipse? 编辑1 我还尝试导出以下内容: export XDEBUG_CONFIG="idekey=PHPSTORM" 配置Firefox plugin但仍然获得完全相同的行为.还要记住,我按下 编辑2 我还在我的PhpStorm上添加了以下配置: 仍然无法正常工作. 解决方法
最后,需要执行以下步骤:
>将以下内容放入:/etc/php/7.0/mods-available/xdebug.ini zend_extension=xdebug.so xdebug.remote_enable=On xdebug.remote_handler=dbgp xdebug.remote_host=localhost xdebug.remote_port=9021 xdebug.remote_mode=req >出口: export XDEBUG_CONFIG="idekey=PHPSTORM" >然后配置PhpStorm,如image所示. 注意: 如果您更改xdebug设置,请按下按钮并再次按回来终止xdebug会话. 此外,万一你通过终端运行composer禁用PhpStorm按下按钮听xdebug. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |