Re: debugging function for possible inclusion in pear

From: Date: Fri, 14 Jun 2002 08:22:41 +0000
Subject: Re: debugging function for possible inclusion in pear
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-7011@lists.php.net to get a copy of this message
le 13/06/02 23:25, Tim Gallagher à timg@sunflowerroad.com a écrit : > A buddy of mine wrote a debugging function while working for me. As of now > it is Internet Explorer specific, but it could be rewritten (maybe not so) > easily to be cross-browser. I have placed it in a file that is included > each time via the php.ini config var auto_prepend_file= which has made it > become almost like a native php function for me. I use it constantly. Using the auto_prepend should be avoided. IMO it would be better to trigger its use directly in the code source by using a simple require. > It is extremely handy for debugging objects as it gives a much more > intuitive view of the object. > > It uses dhtml to hide branches of arrays and sub objects (when viewing an > object) I wonder if it wouldn't be better to have its display in a new window a bit like the Smarty debugger. This way it would be proper html and compatible with Netscape on Linux. Plus, it wouldn't distract attention from the main result window. > This could become a standard developer's tool if added to pear, however as > of right now it is a mess of code. If anyone is interested, I will attach > a file containing the code and we can work on it. You should give a link to your code. > you can see sample output of the function located at: > http://php.smur.net/tim/test/QuickForm_example.php > Linux people: keep in mind that this only works on IE so don't get grumpy - > you've been warned. > > syntax is rprint($variable); > > we chose rprint because it's so close to print_r and is easy to remember, > plus if you type "print" very much, it's quick to type, and there's no > shift to hit for the underscore. > > comments, offers of help to port to cross browser, and/or offers to clean > up code are all welcome > flames about linux/css/html/ihatemicroshaftedme/doesn't work for me > dev/null Layout could be much lighter and then display much faster. Anyway, this is still an interesting tool. Thanks, Bertrand Mansion Mamasam

« previous php.pear.dev (#7011) next »