从家里的PHPStorm调试laravel工匠
我设置了Laravel Homestead.然后我配置了homestead xdebug.ini和
PHPStorm,使调试工作.
这是我的宅基地xdebug.ini zend_extension=xdebug.so xdebug.remote_autostart = on xdebug.remote_enable = on xdebug.remote_connect_back = on xdebug.remote_port = 9000 xdebug.idekey = "vagrant" 要启动调试会话,我遵循的步骤是 >在PHPStorm – >开始聆听连接 这样做完美.我的问题是当我在homestead命令行,我运行一个php工匠命令,那么我无法得到它打破我的断点. 我试过了 > XDEBUG_CONFIG =“idekey = PHPSTORM”PHP_IDE_CONFIG =“serverName = server_name”php -dxdebug.remote_host =“127.0.0.1”artisan mycommand
两件事情很重要:
> remote_connect_back无法在CLI的情况下工作,因为Xdebug在控制台时无法检测到远程IP 以下为我工作: php -dxdebug.remote_autostart=on -dxdebug.remote_connect_back=off -dxdebug.remote_host=10.0.2.2 artisan >编辑如果您的断点未被击中,您必须正确设置文件夹映射(因为您的IDE中的路径与Web服务器看到的不同: >在VM中导出PHP_IDE_CONFIG =“serverName = yourservername”,其中您的服务器名称是您在“名称”下的屏幕截图中配置的内容 >将您的IDE密钥和remote_host添加到虚拟机的XDEBUG-CONFIG export XDEBUG_CONFIG =“idekey = artisan remote_host = 10.0.2.2” 参考文献:http://randyfay.com/content/remote-command-line-debugging-phpstorm-phpdrupal-including-drush (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |