php xdebug 性能优化

来源:互联网 发布:windows程序设计 最新 编辑:程序博客网 时间:2024/04/28 05:47

关于php代码调试就不再多说了。用过才知道爽!!!

之前写过一边配置,请查看 关于xdebug配置

关于xdeubg的一些坑

  • 用的多了缓存文件太多,造成特别慢
  • 自动开启检测,在不使用的时候也回很慢
[xdebug]zend_extension="/usr/local/opt/php71-xdebug/xdebug.so"xdebug.auto_trace = Onxdebug.trace_output_dir = "/var/tmp/xdebug"xdebug.profiler_output_dir = "/var/tmp/xdebug"xdebug.profiler_enable=0;是否开启远程调试自动启动;关闭自动开启调试xdebug.remote_autostart = 0;是否开启远程调试xdebug.remote_enable = On;允许调试的客户端IPxdebug.remote_host=localhost;远程调试的端口(默认9000)xdebug.remote_port=9001;调试插件dbgpxdebug.remote_handler=dbgp;是否收集变量xdebug.collect_vars = On;是否收集返回值xdebug.collect_return = On;是否收集参数xdebug.collect_params = On;是否开启调试内容xdebug.profiler_enable=On;设置php显示的级别长度xdebug.var_display_max_depth=10xdebug.idekey = PHPSTORM

xdebug.remote_autostart = 0 这是最重要的。关闭之后,使用google的插件来唤醒ide的debug,可以解决在不使用debug的情况,避免等待时间

阅读全文
0 0
原创粉丝点击