PHPStorm solves Xdebug Slow problem_PHP tutorial

WBOY
Release: 2016-07-13 10:57:37
Original
1238 people have browsed it

I just set up the debugging environment of PHPStorm+xdebug during the day today, and I encountered various problems: ultra-slow response when accessing, ultra-fast response when accessing, but a blank page.

There are many ways to solve problem A, but there is always a solution; I think problem B is a thread problem, maybe it can be solved by debugging the configuration of php.ini, maybe not, it is difficult to explain clearly, the thread problem may need to be solved with xdebug version is related.


Solution

PHP.ini Find the memory_limit parameter and increase it!

Change a browser! I had been using Google Chrome to debug the program, and then it started to slow down until each page took 6 seconds to load. It was unbearable. Neither Firefox nor IE had this problem. (This method is very easy to use and can produce results immediately!)

Use xdebug.profiler_enable_trigger configuration to selectively run the xdebug function profiler.

The value of xdebug.remote_host should be consistent with the IP of your server. For example, if you access through localhost, write localhost here. If you access 127.0.0.1, write 127.0.0.1

Check if your xdebug.profiler_output_dir directory has reached several gigabytes? (After more than ten hours of continuous development of an e-commerce program, the xdebug files in the xdebug.profiler_output_dir directory may reach several gigabytes!)

It is best to turn off xdebug when it is not needed!
xdebug.remote_enable = 0
xdebug.profiler_enable = 0
xdebug.remote_autostart = false
Finally, one sentence: DON’T RUN XDEBUG ON PRODUCTION.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632074.htmlTechArticleI just set up the debugging environment of PHPStorm+xdebug during the day today, and encountered various problems: accessing the server exceeded Slow response, access to super fast response but a blank page. There are many ways to solve problem A, always...
Related labels:
source:php.cn
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