我经常使用xdebug来调试应用程序,我已经构建了一个laravel应用程序,它可以上传一个csv,将数据插入到数据库中,并将id输入到作业队列中.
我写了一个工匠命令,通过cron运行,然后对这些数据做一些事情.
Xdebug适用于通过浏览器访问该站点,但从cli运行时它不会破坏断点.
我运行php5-fpm.我的文件/etc/php5/fpm/php.ini和/ etc / php5 / cli / php / ini
两者都包含以下设置:
zend_extension=/usr/lib/php5/20121212/xdebug.so
xdebug.remote_enable = 1
xdebug.idekey = 'dev_docker'
xdebug.remote_autostart = 1
xdebug.remote_connect_back = {{my host ip}}
xdebug.remote_port = 9000
xdebug.remote_handler=dbgp
然后我运行artisan命令
php artisan jobqueue::process --batch-size=10 --sleep=10
我知道命令正在运行 – > info(‘text’)显示在终端中
谁知道我错过了什么?