使用xdebug调试程序后程序很慢的缘由

有一个缘由就是开启调试的会话没有正确的关闭,即PhpStorm这边关闭了而没有通知服务端xdebug关闭,致使服务器资源被耗尽,这时只有重启服务端的服务才能够。php

因此必须保证每个调试会话被正确关闭。能够调用PhpStorm的stop中止调试或者一直走完整个调试会话。服务器

关闭xdebug的性能分析功能,只能xdebug来调试代码。性能分析用xhprofide

配置以下:性能

; XDEBUG Extension
[xdebug]
zend_extension ="D:/wamp64/bin/php/php5.6.16/ext/php_xdebug-2.5.3-5.6-vc11-x86_64.dll"
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir ="D:/wamp64/tmp"
xdebug.auto_trace = 0
xdebug.show_local_vars=0debug

xdebug.var_display_max_children=128
xdebug.var_display_max_data=512
xdebug.var_display_max_depth=5 调试

xdebug.idekey=PhpStorm
xdebug.remote_enable = On
xdebug.remote_host=127.0.0.1 //IDE所在机器IP
xdebug.remote_port=9000 //IDE监听的端口号,用来和服务端的XDEBUG通讯用
xdebug.remote_handler=dbgporm

xdebug.remote_connect_back=1 //这个要加上,不然没法调试,这个配置的做用是当配置的远程IDE的host和端口号有问题时,会经过请求头读取IDE的IP从而完成通讯资源

xdebug.remote_autostart=0rem

相关文章
相关标签/搜索