承接 pedrotroller/trace-debug 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pedrotroller/trace-debug

最新稳定版本:v1.0.1

Composer 安装命令:

composer require pedrotroller/trace-debug

包简介

A little debugging tool. You can capture stack traces.

README 文档

README

#TRACE DEBUG

Scrutinizer Code Quality

##What is it ?

A simple library and a Symfony bundle. With it, you will be able to captule stacktraces and display them into the debug toolbar.

##Installation (Symfony Bundle)

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
        );

        if (in_array($this->getEnvironment(), array('dev', 'test'))) {
            // ...
            $bundles[] = new PedroTroller\TraceDebug\Bundle\TraceDebugBundle();
        }

        return $bundles;
    }
}

##Usage

This library will add a new function : trace(). You just have to call this function and a stacktrace will be captured.

class SomeClass
{
    public function someFunction() {
        // ...
        trace();
        // ...
    }
}

And thats all, now, you will see a new button into the toolbar named Trace() with the number on stacktrace captured.

##Capture multiple stacktrace from multiple places

If you want to capture stacktrace from differents places, it will be dificult to know which trace come from which place... So, you just have to give a name to the capture.

class SomeClass
{
    public function someFunction() {
        // ...
        trace('capture1');
        // ...
    }

    public function someOtherFunction() {
        // ...
        trace('capture2');
        // ...
    }
}

And so, the display will sort traces from the name of the capture.

统计信息

  • 总下载量: 14.05k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-09