Is There a way to debug RabbitMQ Consumer (php-ampqlib) using PhpStorm and Xdebug?

Here is my dev setup:

IDE: PhpStorm 9.0.2
Debugger: Xdebug 2.3.3
Message Queue Server: RabbitMQ 3.5.6
PHP Lib to connect to RabbitMQ Server: php-ampqlib

To start my consumer I’m using a CakePHP Task and run like this:

../lib/Cake/Console/cake cron message_trigger_consumer

When I run this command, my consumer is UP and waiting for a message, that will comes from a Producer (for example: Save Form Button that send a confirmation email). Until here, everything is OK, but my two questions are:

1) Is There a way to debug the Consumer? In my point of view, Consumer is in a different process, that’s why Xdebug cannot debug it
2) Have some way to attach my Consumer process to my current debug in PhpStorm + Xdebug?

If you not understand my question, please, show me your doubts.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s