chromephp:chrome浏览器php控制台调试工具使用指南

简介

ChromePhp 是通过header来传输调试内容并通过安装 Chrome 浏览器的插件读取header 信息显示到浏览器调试面板中进行查看,功能比较强大,对页面没什么太多干扰,调试也更方便,火狐下据说也有类似的 firePhp

相关链接

官网地址
http://www.chromelogger.com/
这是该开源项目的 Github 地址:
https://github.com/ccampbell/chromephp
Chrome 内核浏览器插件的安装地址:
https://chrome.google.com/extensions/detail/noaneddfkdjfnfdakjjmocngnfkfehhd

使用方法

1、安装chrome插件
安装完毕后如下图:
这里写图片描述
需要单击打开次插件
这里写图片描述

2、编写代码参考如下

<?php
include 'ChromePhp.php';
ChromePhp::log('hello world');
ChromePhp::log($_SERVER);

// using labels
foreach ($_SERVER as $key => $value) {
    ChromePhp::log($key, $value);
}

// warnings and errors
ChromePhp::warn('this is a warning');
ChromePhp::error('this is an error');

// group
ChromePhp::group('this is group');
ChromePhp::log('Hi this is chromephp!');
ChromePhp::error('error message!');
ChromePhp::groupEnd();

ChromePhp::table(
    array(
        array('name' => 'jianhun', 'age' => 21),
        array('name' => 'qinxin', 'age' => 22)
    )
);

?>

3、运行效果
这里写图片描述

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值