Xdebug is a good component for debugging php. However, if you do not configure it properly, you will encounter various problems:
A: slow access response
B: access to ultra-fast response, but it is a blank page.
Problem A has many solutions, but there are still Solutions. Problem B is probably A thread problem. Maybe you can Debug php. the ini configuration may not be completed. It is difficult to clarify that the thread issue may be related to the xdebug version.
Solution
Find the memory_limit parameter in PHP. ini and increase it!
Change the browser! I used Google Chrome to debug the program, and then started to slow down until every page became loaded in 6 seconds. Firefox and IE do not solve this problem. (This method is easy to use and can take effect immediately !)
Use the xdebug. profiler_enable_trigger configuration to run the xdebug function probe program.
The value of xdebug. remote_host should be the same as the IP address of your server. For example, if you access it through localhost, write localhost here. If you access it through 127.0.0.1, write it to 127.0.0.1.
Check whether your xdebug. profiler_output_dir Directory has reached several GB? (After a set of e-commerce programs are continuously developed for more than 10 hours, the xdebug file in the xdebug. profiler_output_dir directory reaches several GB !)
Close xdebug when you do not need it!
Xdebug. remote_enable = 0
Xdebug. profiler_enable = 0
Xdebug. remote_autostart = false
Now let's introduce the parameter configuration.
[Xdebug]
Zend_extension = "F:/wamp/php5.4/ext/php_xdebug-2.2.3-5.4-vc9.dll"
Xdebug. auto_trace = On
Xdebug. collect_params = On
Xdebug. collect_return = On
Xdebug. trace_output_dir = "F:/wamp/tmp/xdebug"
Xdebug. profiler_enable = On
Xdebug. profiler_output_dir = "F:/wamp/tmp/xdebug"
3. xdebug configuration description: http://xdebug.org/docs/all_settings
Xdebug. auto_trace = 1
Whether to allow Xdebug to trace function calls. Trace information is stored as files. The default value is 0.
Collect_params = 1
Whether to allow Xdebug to trace function parameters. The default value is 0.
Xdebug. collect_return = 1
Whether to allow Xdebug to trace function return values. The default value is 0.
Xdebug. profiler_enable = 1
Open the xdebug performance analyzer and store it as a file. This configuration cannot be configured using the ini_set () function. The default value is 0.
Xdebug. profiler_output_dir
Storage location of performance analysis files; default value:/tmp
Xdebug. profiler_output_name
Naming rules for performance analysis files. The default value is cachegrind. out. % p.
Xdebug. trace_output_dir
Directory of the output file of the function call trace information. The default value is/tmp.
Xdebug. trace_output_name