Article directory
1. Download the plugin
You can go to the Google Play Store to download:
1. Browser download plug-in: Xdebuger helper
After downloading, select the first option: Debug
2. Setup PhpStorm
2. phpstorm settings
3. Configure the ini file of php
3. Configure the ini file of php
Note: What is the php version set by phpstorm, you can configure it in the php.ini file of that version
4. Add the xdebug extension of php
4. Configure the extension of php
Here I use phpstudy's php, and I need to check the xdebug extension in this place:
5. Breakpoint debugging
5. Open the monitor button of PhpStorm and set a breakpoint
Access the php program in the browser, and you can enter the breakpoint debugging:
6. There is a timeout problem
6. There is a timeout problem
But when you debug for too long, the page will be disconnected directly, because there is a debug timeout limit:
7. Problem solving
7. Debug timeout setting
Then modify the configuration file to add the following code:
IPCConnectTimeout 300000
IPCCommTimeout 300000
Of course, the value can be set larger, and the unit is milliseconds.
Then restart the Apache service:
You can also refer to this article to solve the timeout problem. I configured it according to this article: https://www.jianshu.com/p/b7b304992c78