Introducing phpstorm and yasd to debug projects in virtual machines

藏色散人
Release: 2021-04-19 19:43:33
forward
3065 people have browsed it

The following tutorial column of phpstorm will 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    #端口
Copy after login

3. Configure the port configured above in phpstorm

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

Introducing phpstorm and yasd to debug projects in virtual machines

4. Configure path mapping

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

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
Copy after login

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!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!