Laravel Valet + PhpStorm + Xdebug

Published 1 year ago by fabianhenzler

hey guys, i've been trying to get this to work, but my no breakpoint hits and no trace is shown.

I checked the /usr/local/etc/php/7.1/php.ini and /usr/local/etc/php/7.1/conf.d/ext-xdebug.ini

I only have

[xdebug]
zend_extension="/usr/local/opt/php71-xdebug/xdebug.so"

in the /usr/local/etc/php/7.1/conf.d/ext-xdebug.ini

I also tried to work acording to https://laracasts.com/discuss/channels/general-discussion/using-php70-xdebug-with-valet https://laracasts.com/discuss/channels/laravel/laravel-valet-xdebug https://pixelfear.com/blog/xdebug-laravel-valet-phpstorm-composer

nothing works :(

The phpinfo(); in my wordpress index.php shows this https://db.tt/Mhx974m8Z8

Best Answer (As Selected By fabianhenzler)
phpMick

I don't use Valet but I always follow this guide;

https://www.sitepoint.com/install-xdebug-phpstorm-vagrant/

I know the technology is different but this has all the steps you need to follow.

In my case, it's normally the folder mappings which are incorrect.

Might be a port thing as well, do you have to forward a port from vm to your host?

This is in my ini:

zend_extension = /usr/lib64/php/modules/xdebug.so
xdebug.remote_enable = on
xdebug.remote_connect_back = on
xdebug.max_nesting_level=500000

Good luck!

phpMick
phpMick
1 year ago (52,220 XP)

I don't use Valet but I always follow this guide;

https://www.sitepoint.com/install-xdebug-phpstorm-vagrant/

I know the technology is different but this has all the steps you need to follow.

In my case, it's normally the folder mappings which are incorrect.

Might be a port thing as well, do you have to forward a port from vm to your host?

This is in my ini:

zend_extension = /usr/lib64/php/modules/xdebug.so
xdebug.remote_enable = on
xdebug.remote_connect_back = on
xdebug.max_nesting_level=500000

Good luck!

phpMick
phpMick
1 year ago (52,220 XP)

Got it working then?

fabianhenzler

yes, Valet runs on Port 9000 so i switched to port 9001 ;)

phpMick
phpMick
1 year ago (52,220 XP)

Nice one.

vladimir

It is not Valet who runs on 9000, it is nginx. Change it to 9001 in phpstorm and in xdebug ini as well

Please sign in or create an account to participate in this conversation.