Vagrant (WSL) + phpstorm + xdebu breakpoint debugging environment

Time:2021-12-4

1. Xdebug configuration in vagrant (Linux) environment:


zend_extension=xdebug.so
xdebug.remote_enable = 1 
xdebug.remote_connect_back = 1 
xdebug.remote_port = 9100
xdebug.idekey = "PHPSTORM" 
xdebug.remote_autostart = 1 
xdebug.remote_handler="dbgp"
xdebug.remote_mode="req"

2. Phptorm configuration:

Set the port as set by Xdebug:

Setting up directory mapping is critical

After configuration, test debug

Run – > start listening for PHP debug connections – > break point – > debug

Visit the website through the browser and phpstorm!!

The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support developpaer.