In Laravel Homestead, I've been able to use Xdebug for unit tests, feature tests, poking around in the browser, etc.
But it hangs when I try to use Xdebug for Dusk (tests in tests/Browser folder).
I thought these questions might help, but I still haven't gotten it working:
debugging laravel artisan from PHPStorm with homestead
Xdebug laravel artisan commands
I've tried various approaches, including:
export XDEBUG_CONFIG="idekey=netbeans-xdebug remote_connect_back=0 remote_host=10.0.2.2"
php artisan dusk
and
export XDEBUG_CONFIG="idekey=netbeans-xdebug remote_host=10.0.2.2"
php -dxdebug.remote_autostart=on -dxdebug.remote_connect_back=off -dxdebug.remote_host=10.0.2.2 artisan dusk
and more.
I've enabled the "Stop at First Line" debugging option in Netbeans, and Netbeans does successfully stop at the first executable PHP line in the artisan
file.
Therefore I think export XDEBUG_CONFIG="idekey=netbeans-xdebug remote_connect_back=0 remote_host=10.0.2.2"
is correctly set up.
But after I click the "play" button to allow the code to continue, Netbeans just says "netbeans-xdebug running" in the bottom right while the console just hangs with a cursor flashing under this line: php artisan dusk tests/Browser/ExampleTest.php
How do I need to change my usage of Xdebug for getting it to work in Dusk too?