Home>Article>Development Tools> Introducing phpstorm and yasd to debug projects in virtual machines

Introducing phpstorm and yasd to debug projects in virtual machines

藏色散人
藏色散人 forward
2021-04-19 17:05:03 2957browse

The following tutorial column ofphpstormwill introduce to you the projects in phpstorm and yasd debugging virtual machines. I hope it will be helpful to friends in need!

Introducing phpstorm and yasd to debug projects in virtual machines

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 #端口

3. Configure the port configured above in phpstorm

在这个路径:File | Settings | Languages & Frameworks | PHP | Debug中的Xdebug Debug port 填上5556

Introducing phpstorm and yasd to debug projects in virtual machines

4. Configure path mapping

在File | Settings | Languages & Frameworks | PHP | Servers这个路径下增加一个server

Introducing phpstorm and yasd to debug projects in virtual machines

5. Turn on button monitoring debug

Introducing phpstorm and yasd to debug projects in virtual machines

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

7. Click the play button to resume the program and wait. Project startup

Introducing phpstorm and yasd to debug projects in virtual machines

#8. Enter the corresponding address in the browser to enter debugging

Introducing phpstorm and yasd to debug projects in virtual machines


The above is the detailed content of Introducing phpstorm and yasd to debug projects in virtual machines. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete