Skip to content

ycheukf/debug

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

debug

Version 0.0.1 Created by ycheukf@gmail.com

Introduction

YcheukfDebug is a debug module for zend framework 2. This module will dump vars and SQL to a cache file instead of printing out directly.

Features / Goals

  • dump vars as var_dump
  • dump db profiler (support multiple db adapter)
  • the debug info will not be rewrote when request a ajax

Requirements

Installation

Install via git

Clone this repo git clone https://github.com/ycheukf/debug.git

Install via Composer

Add this to your composer.json under "require": "ycheukf/debug": "dev-master"

Run command: php composer.phar update

Usage

1: add module 'YcheukfDebug' to your application.config.php

return array(
    'modules' => array(
        'YcheukfDebug',
        'Application',
    ),
);

2: use the below code as var_dump

	\YcheukfDebug\Model\Debug::dump($var, 'memo');

3: check the output at http://yourzf2project/public/index.php/ycfdebug

Advanced Usage

If a project has multiple db adapter and master-slaver adapter, you need to attach a new event 'YcheukfDebugSetProfiler' into your code. just like the code in 'setAttach' function at vendor/ycheukf/debug/Module.php

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%