PHP debug

本文详细介绍了如何在VSCODE和PHPSTORM开发环境中配置Xdebug,包括zend_extension路径、性能检测、代码追踪、参数收集、返回值收集以及远程调试设置。
摘要由CSDN通过智能技术生成

php.ini

================================================================

VSCODE

[Xdebug]
zend_extension=D:/appProject/phpstudy_pro/Extensions/php/php7.4.3nts/ext/php_xdebug.dll
xdebug.collect_params=1
xdebug.collect_return=1
xdebug.auto_trace=On
xdebug.trace_output_dir=D:/appProject/phpstudy_pro/Extensions/php_log/php7.4.3nts.xdebug.trace
xdebug.profiler_enable=On
xdebug.profiler_output_dir=D:/appProject/phpstudy_pro/Extensions/php_log/php7.4.3nts.xdebug.profiler
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9200
xdebug.remote_handler=dbgp
xdebug.start_with_request=true
xdebug.remote_autostart=1

================================================================

PHPSTORM

[Xdebug]
zend_extension=D:/appProject/phpstudy_pro/Extensions/php/php7.4.3nts/ext/php_xdebug.dll
zend_extension=D:/appProject/phpstudy_pro/Extensions/php/php7.4.3nts/ext/php_xdebug.dll
;启用性能检测分析
xdebug.profiler_enable=on
;启用代码自动跟踪
xdebug.auto_trace=on
;允许收集传递给函数的参数变量
xdebug.collect_params=on
;允许收集函数调用的返回值
xdebug.collect_return=on
;指定堆栈跟踪文件的存放目录
xdebug.trace_output_dir=“D:/debug”
;指定性能分析文件的存放目录
xdebug.profiler_output_dir=“D:/debug”
xdebug.profiler_output_name = cachegrind.out.%t.%p

xdebug.idekey=“PHPSTORM”
xdebug.remote_handler = “dbgp”
xdebug.remote_mode = “req”
xdebug.remote_host=localhost
xdebug.remote_enable=on
xdebug.remote_port = 9300
xdebug.remote_autostart = no

  • 8
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值