Motor Aircraft Car

debugging in joomla dumpBacktrace dumpMessage dumpTemplateParams PDF Print E-mail
Written by Administrator   
Monday, 07 July 2008 11:59
This utility makes life easy for developers and template designers. You use it to see what's inside a variable, an array or an object. Instead of using print_r() or var_dump(), you can now use dump(). This will open a popup window with a nice expandable DHTML tree, showing the contents of the variable. It will even show a list of available methods for each object. You can use dump() in your extensions, in the core, in libraries and even in templates.

Using Dump
Anywhere in your code, type:

dump( $variable, 'Variable Name' );

Simple huh? 'Variable Name' is optional and can be anything you like. If you use a lot of dumps, you'll want to use some descriptive names.

- dumpSysinfo();
Displays a whole bunch of system information.
- dumpTemplateParams( $this );
Use inside a template's index.php to dump the parameters.
- dumpMessage( 'Your message' );
Displays a custom message. Very handy to check if a function or a loop is executed etc...
- dumpBacktrace();
Displays the backtrace.
Last Updated on Friday, 10 December 2010 15:26
Copyright © 2020 Motor Aircraft Car. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.