

I hope this info helps someone else get this all working. Make sure you have xdebug installed and in php. For CLI script debugging I suggest to override xdebug. In this case, you can get the host ip address by running the following command: docker inspect -f To make this work for PhpStorm, the xdebug.ini file should contain at least two entries: xdebug.remoteconnectback0 (that is, if you want a debugging session triggered from the browser). env file: SAIL_XDEBUG_CONFIG="client_host=" If you're on linux, you also need to add this to your. Or, if you want the develop mode as well you can add: SAIL_XDEBUG_MODE=develop,debug Cannot start debugger session with 'Xdebug 3.0.4' Validate installation.

If you're on Windows/WSL2 all you need to do is add the following line(s) to your. Here are the issues: After starting via the 'Debug' sign, I get the following error message: Connection was not established. env vars that you can use to change how XDebug works with Sail. Thank you to github user nhaynes for all of this. For future reference and for anyone else facing that problem I decided to write this blog post. See for a brief discussion on these changes. Here's my interpretation (please correct me if I'm wrong).Īs of August, 2021, Laravel Sail now comes with the docker containers configured correctly for XDebug.
#Phpstorm xdebug not working how to
I do seem to have xdebug running correctly on the server, but despite spending the day reading posts on how to make this happen I just can’t get phostorm to connect to xdebug.ĭoes anyone have step by step instructions on how to do this? It seems like this would be a good thing to have here or in the Sail documentation. I had an issue with Xdebug not stopping at breakpoints except for the first line of code in only one of my local PHP projects. install xdebug-3.0.0beta1via PECL and enable it (on php 7.4 fpm container) write xdebug config: xdebug.modedebug. I’m rather new to Laravel I’m loving it so far and making good progress on my project.īut, I’m having an awful time getting xdebug, sail, and phpstorm to play nice.
