Xdebug of Laravel Dusk in Netbeans on Homestead

倖福魔咒の 提交于 2019-12-02 01:49:18

It doesn't work because Dusk executes the actual PHPUnit test in a separate process, so it doesn't know about XDEBUG_CONFIG.

In principle, Dusk tests still work when you execute them directly (phpunit tests/Browser/ExampleTest.php). The main feature of php artisan dusk are custom .env.dusk[.local] files.

If you don't require that, you can try calling them directly. Then Xdebug should behave the same way it does with all your other PHPUnit tests.

As in my answer here, there is an option of running php -dxdebug.remote_enable=1 -dxdebug.remote_host=10.0.2.2 -dxdebug.remote_port=9000 -dxdebug.remote_handler=dbgp artisan my:command

You can also add those parameters to xdebug.ini like so:

zend_extension_ts = "./php/ext/php_xdebug<-version-number>.dll"
xdebug.remote_enable=1
xdebug.remote_host=10.0.2.2
; Port number must match debugger port number in NetBeans IDE Tools > Options > PHP
xdebug.remote_port=9000
xdebug.remote_handler=dbgp

xdebug.idekey=netbeans-xdebug (although I think it should work without this too)

Try removing break at first line option. Also try running debug directly from console with those options. And finally check that the correct port is set to listen in NetBeans and xdebug since that could cause problems too.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!