I often use Xdebug for troubleshooting and interactively debugging local code as I write it.
It can be very useful to set some debug breakpoints and then run code interactively using
artisan, but occasionally when I run
php artisan tinker, the PHP shell just sits there and doesn’t accept any input until I kill my xdebug listener.
Thanks to this issue, I finally have a solution.
Add this to the psysh config file (
~/.config/psysh/config.php on macOS):
<?php return [ 'usePcntl' => false, ];