How to Debug Laravel Queues ? |
Site Admin
|
By looking at your post I can't figure out what's wrong.
Can you provide more details? In particular -- what you're trying, precisely, and what you're getting? Normally running debugger is not a big deal -- it's just matter of having DBGSESSID variable either in _COOKIE, _GET or _POST, or invoking DebugBreak() function. |
||||||||||||
_________________ The PHP IDE team |
debugging queues from CLI |
|
@robdlyon
I assume you are trying to debug from command line (CLI). We succeeded to run debug session with RabbitMQ in Yii2 framework like so: 1/ run CLI command with normal CLI parameters passed to entry script, e.g. in yii it would be: ./yii queues/send-emails --maxcount=15 DBGSESSID=123456789@192.168.0.111:7869 Important part is "DBGSESSID=123456789@192.168.0.111:7869" which tells server to start debug session - it's also described in PHPEd's documentation online, pls check. 2/ Since this is CLI command, PHP loads different php.ini than when processing HTTP request via web server. So make sure php.ini loaded via CLI also loads correct version of DBG module. See also this thread on dumping CLI phpinfo: https://stackoverflow.com/questions/8954964/how-to-set-error-log-for-php-cli/30823469#30823469 3/ Once debug session started, you may set breakpoints inside e.g. queue callback function - it will work normally. I am not sure whether laravel will correctly pass CLI arguments, for example PHPUnit can not (cannot start debug session via CLI in PHPUnit - at least versions bellow 5) |
||||||||||||
|
Guru master
|
You can also use DebugBreak in your code. I often wrap that with a suitable check to ensure a DebubBreak cannot be accidentally used in production:
You can optionally use all of the normal DBGSESSID parameters on the end of the string, such as for starting profiler, etc. |
||||||||||||||
|
How to Debug Laravel Queues ? |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by