PhpStorm + PHP+ phpStudy breakpoint debugging configuration (nanny level tutorial)

1. Download the plugin

You can go to the Google Play Store to download:

image-20230817151512164

1. Browser download plug-in: Xdebuger helper

After downloading, select the first option: Debug

image-20230817144414886

2. Setup PhpStorm

2. phpstorm settings

image-20230817144650095

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

image-20230817145044773

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:

image-20230817150347191

5. Breakpoint debugging

5. Open the monitor button of PhpStorm and set a breakpoint

image-20230817150744613

Access the php program in the browser, and you can enter the breakpoint debugging:

image-20230817151952784

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:

image-20230817150448837

7. Problem solving

7. Debug timeout setting

image-20230817150954722

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.

image-20230817151236606

Then restart the Apache service:

image-20230817151303310

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

Guess you like

Origin blog.csdn.net/weixin_46367450/article/details/132342285