这不是问题,但想与您分享我用来使xDebug在PHP 7.2上使用Scotchbox在Vagrant上运行的配置。
我在使xDebug与scotchbox配合使用时遇到问题,发现许多其他文章提供了建议的配置,但没有一篇对我有用。
这是我的过程:
zend_extension=/usr/lib/php/20170718/xdebug.so
滚动到底部>粘贴:
[XDebug]
sudo nano /etc/php/7.2/apache2/php.ini
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_connect_back = 1
xdebug.remote_host = 192.168.33.0
xdebug.remote_port = 9000
xdebug.remote_log = /var/log/xdebug.log
重启apache:sudo service apache2 restart
,如果使用https,则需要
sudo a2enmod ssl;sudo service apache2 restart
> xDebug配置为默认值:
{ //使用IntelliSense了解可能的属性。 //悬停以查看现有属性的描述。 //有关更多信息,请访问:https://go.microsoft.com/fwlink/?linkid=830387 “ version”:“ 0.2.0”, “配置”:[ { “ name”:“收听XDebug”, “ type”:“ php”, “ request”:“启动”, “ pathMappings”:{ “ / var / www / public /”:“ $ {workspaceRoot}” }, “端口”:9000, “日志”:为true }, { “ name”:“启动当前打开的脚本”, “ type”:“ php”, “ request”:“启动”, “ program”:“ $ {file}”, “ cwd”:“ $ {fileDirname}”, “端口”:9000 } ] }
我希望这可以帮助某人,因为我花了一些时间来锻炼:)