Welcome Guest, Not a member yet? Register   Sign In
New library -> Myfirebug
#1

[eluser]SlasherX[/eluser]
Have a new library up and would like people to give it a try and let me know any issues you run across.

This library allows you to display php debug information using the console of firebug (rather then an extra tab under firephp)

http://betaview.net/doku.php?id=codeigni...ry#library

It's just starting so forgive any glaring errors but it should work fine under php 4 and 5.

Update: Next major revision will include "buffers" that will allow you to separate messages into different groups and display them in the order you want. This should prevent messages from getting intertwined from one block to the next.

IE:
Code:
- Controller
  -message
  -message
  -message
- Model
  -message
  -message
  -message
- Model
  -message
  -message
  -message

Updates:
Code:
-  1.0.1: Remove need to convert array to string before sending. Now you can just send the array.
-  1.0.0: First Public Release
--Terry Valladon
#2

[eluser]coolfactor[/eluser]
Any way to download the library file without copying the source from that page? I didn't see a linked file anywhere.
#3

[eluser]SlasherX[/eluser]
[quote author="coolfactor" date="1186205041"]Any way to download the library file without copying the source from that page? I didn't see a linked file anywhere.[/quote]

Good point.

Page is updated with a download link. http://betaview.net/dropbox/Myfirebug.php.txt

Thank you.
#4

[eluser]ScottR[/eluser]
How do you use this? Does it extend the CI log class and just write the log messages out to the console for firebug to display?

Good idea, just not sure where to put this file
#5

[eluser]SlasherX[/eluser]
[quote author="ScottR" date="1186409957"]How do you use this? Does it extend the CI log class and just write the log messages out to the console for firebug to display?

Good idea, just not sure where to put this file[/quote]

No it does not extend CI_log. CI_log does it job great, it logs messages to a file, so I see no reason to change or extend it.

To use this library you first have to have firebug installed and be running a firefox browser, you can download firebug at getfirebug.com and can download firefox at mozilla.com.

Myfirebug.php is placed in the /system/application/libraries folder and loaded using
Code:
$this->load->library("Myfirebug");
in your controller file.

To display a message in firebug use:
Code:
$this->myfirebug->debug($message);
where $message is the debug information you want to look at.

It is not created to replace any existing error reporting functions that CI has, it was just created to give a user friendly alternative.

I like not having to reload a log file to display debug messages, when I am in the middle of programming having to move away from the code or the display can be distracting.

Consider this an alternative to using echo to display variables or <!--message--> and then viewing source.




Theme © iAndrew 2016 - Forum software by © MyBB