Part of the EllisLab Network
   
1 of 2
1
Debug Toolbar
Posted: 10 November 2009 10:45 PM   [ Ignore ]  
Summer Student
Avatar
Total Posts:  12
Joined  06-27-2008

I have made some changes and improvements to the 0.1 Debug Toolbar and packaged it into a 0.2 ‘release’.

Tested on 1.7.2 and has a number of additions/changes. Ofcourse this is for debug only and will impede the performance of your site—hence I have also added the optional flag debug_key to call the toolbar on demand.

Enjoy.

CI Debug Toolbar
Version 0.2

This is a modified version of the original debug toolbar for CI ported from Kohana

Copyright

- based on Kohana Debug Toolbar by Aaron Forsander (http://pifantastic.com/kohana-debug-toolbar/)
- 0.1 ported to CodeIgniter by quark (.(JavaScript must be enabled to view this email address))
- 0.2 additions by Kon Wilms (.(JavaScript must be enabled to view this email address))

Installation

- copy assets folder to webroot
- copy all other content to respective application subdirectories
- enable hooks in application config
- add the following to config/hooks config:

$hook['display_override'= array(
    
'class' => 'debug_toolbar',
    
'function' => 'render',
    
'filename' => 'debug_toolbar.php',
    
'filepath' => 'hooks'
  
); 

- configure the config/debug_toolbar config

Additions/Changes

- config files are generically parsed for all contents
- matchbox config files are supported and are listed as modules:/name/config
- menu graphic changed
- some js/css modifications taken from the kohana debug_toolbar (alignment)
- added ability to list files called
- debug bar can be enabled if hidden with a debug_key passed as a $_GET parameter
- changed all names to debug_toolbar to simplify maintenance
- assets moved and categorized

Debug_key Functionality

- edit the debug_toolbar config, set render to FALSE, set a key, and modify the following):
- edit the application config

$config['uri_protocol'"PATH_INFO";
...
$config['enable_query_strings'TRUE

Fin.

Edit: Attached a preview image of 0.2.

File Attachments
CI_Debug_Toolbar_0.2.zip  (File Size: 32KB - Downloads: 467)
Profile
 
 
Posted: 10 November 2009 11:18 PM   [ Ignore ]   [ # 1 ]  
Summer Student
Total Posts:  15
Joined  02-17-2009

Its help a lot to develop application. Thanks you and thanks to original developer.

Profile
 
 
Posted: 10 November 2009 11:34 PM   [ Ignore ]   [ # 2 ]  
Grad Student
Avatar
Rank
Total Posts:  64
Joined  01-10-2007

That sure looks interesting. Thanks a lot!

 Signature 

http://www.polarblau.com

Profile
 
 
Posted: 11 November 2009 09:10 AM   [ Ignore ]   [ # 3 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  335
Joined  05-09-2008

hey konfoo!

this looks great. many thanks for sharing.

 Signature 

http://www.starfishwebconsulting.co.uk


Quicksnaps - CI Photo gallery app

Profile
 
 
Posted: 11 November 2009 05:50 PM   [ Ignore ]   [ # 4 ]  
Grad Student
Avatar
Rank
Total Posts:  69
Joined  10-14-2008

Nice! Thanks.

 Signature 

CodeIgniterPhp5 Plugin (Autoloader, Modularity, Fast Coding) | Notepad++ Color Theme for NetBeans

Profile
 
 
Posted: 28 October 2010 03:18 PM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  11
Joined  11-02-2009

Thx!

In Codeigniter 2.0 I get this message when the ‘benchmarks’ panel is enabled, could you help?

A PHP Error was encountered

Severity
Notice

Message
Undefined propertyCI_Benchmark::$checkpoints

Filename
hooks/debug_toolbar.php

Line Number
121 
Profile
 
 
Posted: 29 October 2010 01:21 PM   [ Ignore ]   [ # 6 ]  
Grad Student
Rank
Total Posts:  53
Joined  04-30-2009

Move “MY_Benchmark.php” file from “application/libraries” to “application/core”. It should work.

Profile
 
 
Posted: 29 October 2010 02:15 PM   [ Ignore ]   [ # 7 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  103
Joined  08-23-2010

Awesome tool michalsn!

I can confirm that moving MY_Benchmark.php to the /application/core folder works smile

Cheers m8!

 Signature 

Bas Vermeulen
Jabo Solutions http://jabo-solutions.eu


PHPIDS library - Intrusion detection

Profile
 
 
Posted: 01 November 2010 05:58 AM   [ Ignore ]   [ # 8 ]  
Summer Student
Total Posts:  11
Joined  11-02-2009
michalsn - 29 October 2010 05:21 PM

Move “MY_Benchmark.php” file from “application/libraries” to “application/core”. It should work.

Thx, used it in my first CI2 install… smile

Profile
 
 
Posted: 07 December 2010 06:00 PM   [ Ignore ]   [ # 9 ]  
Summer Student
Total Posts:  14
Joined  10-11-2007
michalsn - 29 October 2010 05:21 PM

Move “MY_Benchmark.php” file from “application/libraries” to “application/core”. It should work.

Should I do the same when using it with 1.72?

I get the same error, and I cant find a core directory in application folder

Profile
 
 
Posted: 07 December 2010 06:32 PM   [ Ignore ]   [ # 10 ]  
Grad Student
Avatar
Rank
Total Posts:  56
Joined  10-13-2010

That looks cool! Thanks for sharing.

Profile
 
 
   
1 of 2
1