- Phpstorm Xdebug 3 Support
- Xdebug 3 Phpstorm Vagrant
- Xdebug Phpstorm Postman
- Xdebug Phpstorm Docker Windows
Xdebug.remoteenable=true # enable remote debugging, exactly what we need 3. Xdebug.remoteconnectback=true 4. Xdebug.remotehost='192.168.33.10' # remote host path, I'll explain that in a second 5. Xdebug.idekey=PHPSTORM # connection key 6. Xdebug.remoteport=9000 # connection port 7. Xdebug.remoteautostart=on 8. Xdebug is a PHP extension which provides debugging, profiling, code coverage, stack traces and many other capabilities. In this succinct tutorial, I will show us how to set up Xdebug that ships with XAMPP in PhpStorm. See the steps below. Open up php.ini (located at C:path-to-xamppphp) for editing.; Search for XDebug and un-comment all its entries. Zendextension = 'C:xamppphpextphp.
When working with PHPStorm and VVV (VaryingVagrantVagrants) in my development environment the integration and activation of Xdebug is relatively seamless.
PHPSTORM + XDEBUG (2/3) + WSL2 + DOCKER. Small example project to show how to configure xdebug (2 or 3) with WSL2 and Docker. This solution works only if you use PhpStorm on WSL2 with X server! WSL2 change Linux IP every reboot time, so you should, add global variable (WSLIP) in your Linux system. Add content from.bashrc to your bashrc. In this video I install Xdebug on the Linux command line through PECL, and then show to find and fix bugs when running unit tests with PHPUnit.
Xdebug 3 is now available it requires slightly different settings in the PHP ini files to work in PHPStorm. Another positive benefit of using Xdebug 3 is it’s now quicker when debugging too.
Starting with out of the box VVV and after running
I ran debug validation in PHPStorm and got this dialog
So, whilst PHPStorm can see the Xdebug configuration it’s not yet fully configured. As noted some Xdebug settings have changed between version 2 and version 3. See the Xdebug update guide for more details
Phpstorm Xdebug 3 Support
Enabling Xdebug 3 with VVV
To enable Xdebug 3 in our VVV / PHPStorm installation we need to add some settings to the php.ini file. VVV creates multiple ini files that are included into PHP as part of the php.ini file. We need to update only one particular file.
Manually – not recommended
If we were to do this manually to resolve the issue shown in the above screenshot, we would have to vagrant ssh
into the virtual environment (from within our VVV folder) and manually edit and add these settings into /etc/php/7.2/fpm/conf.d/20-xdebug.ini
The site in my virtual machine uses PHP 7.2. Be sure to add these settings to the right one for your project
The IP address exposed by my VVV installation is 192.168.50.1. Yours will most likely be the same.
Xdebug 3 Phpstorm Vagrant
BUT! Adding these settings to /etc/php/7.2/fpm/conf.d/20-xdebug.ini
manually would get overwritten on any vagrant provision.
Automatically including Xdebug 3 settings in php ini file
So, to have these settings included in the php.ini for each host and PHP version, in a terminal window inside your VVV folder (~/Sites/vvv/
for me) you can
Edit config/php-config/xdebug.ini
Add both these lines to the end:
Xdebug Phpstorm Postman
Now, and don’t forget this step, be sure to set your Xdebug port to 9003 inside PHPStorm
And save the file and from your VVV folder inside your terminal window run the following command
No when you go back into PHPStorm to validate the installation you should see something like this:
Now I can debug my PHP code much easier and quicker.
Xdebug Phpstorm Docker Windows
Thank you for the featured image : Photo by Ben on Unsplash