php 打印 trace,php xdebug trace 调试的问题

学习xdebug的trace用法,现将遇到的问题写在下面,希望高手指教,谢谢.

环境xdebug +sublime +chrome浏览器+debug helper

php.ini中的配置:

[xdebug]

zend_extension ="D:/wamp64/bin/php/php7.0.10/zend_ext/php_xdebug-2.4.1-7.0-vc14-x86_64.dll"

xdebug.remote_handler = dbgp

xdebug.remote_host = localhost

xdebug.remote_mode = req

xdebug.remote_port = 9000

xdebug.idekey=PHPSTORM

;远程调试

xdebug.remote_enable=ON

xdebug.remote_autostart=on

;开启自动跟踪

xdebug.auto_trace = On ;开启自动跟踪

xdebug.trace_output_dir="E:\xdebug\trace"

xdebug.trace_enable_trigger_value="XDEBUG_TRACE"

xdebug.collect_params = 4

xdebug.collect_includes = On

xdebug.collect_return = On

xdebug.show_mem_delta = On

;把执行情况的分析文件写入到指定目录中

xdebug.profiler_enable=on

xdebug.profiler_output_dir="E:\xdebug\profiler"

被测试的php代码switch.php:

function test($data,$func='strip_tags'){

xdebug_start_trace();

if(empty($data)){

return $data;

}

//需要对方法进行约束

switch($func){

case 'strip_tags':

$func="strip_tags";

break;

case 'intval':

$func="intval";

break;

case 'htmlspecials':

$func="htmlspecials";

break;

default:

die;

}

return $func($data);

xdebug_stop_trace();

}

echo test("<sript>alert('abc');xxxx</script>");

xdebug helper设置:

bV0pwP?w=603&h=226

访问地址:

http://localhost/NutCloud/demo/php_basic/test/switch.php?XDEBUG_TRACE

为啥我的E:xdebugtrace目录下没有任何文件产生,我哪个环节出了问题?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值