【发布时间】:2015-03-12 05:54:15
【问题描述】:
我设置了 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 --> 开始监听连接
- 在 PHPStorm 中设置断点
- 在我的浏览器中 --> 使用 XDebug Chrome Helper 或添加到我的 URL ?XDEBUG_SESSION_START=
- 加载页面
这非常有效。我的问题是,当我在 homestead 命令行中运行 php artisan 命令时,我无法让它达到我的断点。
我的尝试
XDEBUG_CONFIG="idekey=PHPSTORM" PHP_IDE_CONFIG="serverName=server_name" php -dxdebug.remote_host="127.0.0.1" artisan mycommandphp -d xdebug.profiler_enable=On artisan mycommand我还尝试设置
xdebug.remote_autostart=On然后设置sudo service php5-fpm restart但我的断点仍然没有在 PHPStorm 中被击中
【问题讨论】:
-
你最终成功了吗?
标签: laravel vagrant xdebug laravel-routing homestead