我使用 Xdebug/PhpStorm 很长时间了,从未见过这个问题:
PhpStorm 2019.1.3
码头工人 18.09.2
图像mattrayner/灯:latest-1804
Ubuntu 16.04.6
PHP v7.3.3-1+ubuntu16.04.1+deb.sury.org+1
当我在 PhpStorm 中运行调试器时,调试器在正确的行上中断,但是当我单步执行代码时,它跳转到代码中的随机位置,浏览器收到空响应,日志中没有错误。
更多信息:
我在带有 image mattrayner/lamp:latest-1604 的同一台机器上有一个类似的设置 - 在这个设置中问题不会重现
如果我设置“在第一行停止”,我可以在第一行单步执行代码,但后续运行不会单步执行代码,区别:PHP 版本 5.5.9-1ubuntu4.27,Ubuntu 14.04.6
当调试器中断时,任何操作都将失败 - 例如,单击运行将完成执行,但浏览器显示空响应且中断后不执行任何操作。
内容 /etc/php/7.3/apache2/conf.d/20-xdebug.ini
zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_port=9000
xdebug.remote_connect_back=0
xdebug.remote_host=host.docker.internal
知道如何解决吗?
尝试了不同的版本 (7.2, 7.3, 7.4) - 结果相同:
这是我的路径映射
和我的 Apache conf
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName dev.usaddress.com
CustomLog /var/log/apache2/access.log vhost_combined
SSLEngine on
SSLCertificateFile /app/dev.usaddress.com.crt
SSLCertificateKeyFile /app/dev.usaddress.com.key
DocumentRoot /app/usaddress
<Directory /app/usaddress>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
临摹微笑
摇曳的蔷薇
扬帆大鱼