I'm running the following setup for my development environment: Host system is a Windows 10 machine, running a Vagrant box with Debian Buster 64. On this client system a nginx 1.14.2 web server is running, together with PHP 8.3.0 and Xdebug 3.3. On the Windows host system I am using PhpStorm 2023.3.1 as IDE.
My Vagrantfile looks like follows in the network config section:
config.vm.network "private_network", ip: "192.168.33.20"
config.vm.network "forwarded_port", guest: 9003, host: 9003
So the client's IP is set to 192.168.33.20 and I'm forwarding the port 9003 - at least this is how I understand this configuration; please correct me if I'm wrong. When I check with hostname -I on Debian VM it also tells me this IP address.
My PHP 8.3.0 includes a config file 20-xdebug.conf which looks as follows:
zend_extension="xdebug.so"
xdebug.mode=debug
xdebug.start_with_request=trigger
xdebug.remote_handler=dbgp
xdebug.client_host=192.168.33.20
xdebug.client_port=9003
xdebug.discover_client_host=true
xdebug.log="/var/log/xdebug-rrdb.log"
xdebug.log_level=0
xdebug.max_nesting_level=-1
xdebug.var_display_max_depth=-1
xdebug.var_display_max_children=-1
xdebug.var_display_max_data=-1
xdebug.idekey="PHPSTORM"
and leads to the following settings shown in phpinfo:
On PhpStorm I've configured a server with the following settings:
My debug settings are these:
When I now start listening for a debug connection, turn on the debug plugin in my browser and reload the page, literally nothing happens in PhpStorm. All my break points are ignored, also no window pops up, telling me that the debugger rushed through without stopping. There is also no window asking me to grant permission for an incoming connection.
I've also tried to break at the first line of any script via the global settings dialog, which also leads to no result.
What am I doing wrong or what am I missing?
I've also tried to change the xdebug.client_host to localhost which didn't work either. Destroying the machine and setting it up from scratch also didn't work.
My Windows firewall is configured to allow connections from PhpStorm to private and public networks.



client_hostmust be the IP of the host OS (Windows in your case) as seen from outside the VM. So look into this firstxdebug_info();output instead ofphpinfo()-- better structure, some troubleshooting info at the top etc. #3 "On PhpStorm I've configured a server with the following settings:" better delete it and let PhpStorm create it for you once it will get a connection. Port has to be web server port and not Xdebug. Host name would normally be the domain name (or a server name in terms of web server).xdebug.remote_handler=dbgp-- it's not used even in Xdebug v2 (simply because it's the only option anyway) so just remove that. #5 For the moment focus on those changes and look into your Xdebug log -- it will show where it tries to connect to (if at all) and what the response is. If it has nothing -- this means that Xdebug does not see the "debug me" flag (a cookie/GET/POST/ENV param)client_hostpaired up with a wrong port in my PhpStorm server settings, which was set to 80 but has to be 443 since I'm using HTTPS. Also I've removed the obsolete settings from my Vagrantfile and the Xdebug config.