1. Install yasd
View https://github. com/swoole/yasd
2. Introduce yasd configuration in php.ini
zend_extension=yasd yasd.debug_mode=remote yasd.remote_host=10.50.50.233 #此处填写宿主机ip地址 yasd.remote_port=5556 #端口
Copy after login
3. Configure the port configured above in phpstorm
在这个路径:File | Settings | Languages & Frameworks | PHP | Debug中的Xdebug Debug port 填上5556
Copy after login
4. Configure path mapping
在File | Settings | Languages & Frameworks | PHP | Servers这个路径下增加一个server
Copy after login
5. Turn on button monitoring debug
6. First type in the editor Breakpoint, and then start the project
Here is hyperf as an example. Hyperf should pay attention to whether to generate a proxy class. The breakpoint must be set on the proxy class
php -e bin/hyperf.php start
Copy after login