Closed EMCP closed 8 years ago
Does the Queue worker use /etc/php5/cli runtime?
If you invoke the worker with php public/index.php queue [....]
, yes you use the CLI runtime. Not sure why (if you configured the config correctly) the cli SAPI does not play nicely with XDebug, but tbh I have never used XDebug with the PHP cli :)
I tried simply adding the above configuration to the cli php.ini
, it merely complained that XDebug is already configured. I'll keep working on this and report back, thank you.
put this code into /usr/bin/xdebug
:
#!/bin/bash
PHP_IDE_CONFIG="serverName=`echo $HOSTNAME`.cli" XDEBUG_CONFIG="idekey=xdebug" php -dxdebug.remote_autostart=1 -didekey=xdebug -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_host=`who am i | awk '{print $5}' | sed 's/[()]//g'` "$@"
next you can run xdebug public/index.php queue [...]
. Good luck!
my IDE starts XDebug with CLI like this C:\xampp\php\php.exe -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9000 -dxdebug.remote_host=127.0.0.1 index.php queue doctrine LtEmail\Queue\EmailQueue --start
I am now happily utilizing
SlmQueue
viaBeanstalkd
, with one problem.XDebug is halting on regular calls made to my ZF2 application, but Queue'd Job code is not.. Any ideas why? Do I need to pass a flag on startup of the Queue Worker?
I'll be glad to write up more once I get it working. Does the Queue worker use
/etc/php5/cli
runtime?/etc/php5/apache2/php.ini