Skip to content

Instantly share code, notes, and snippets.

@epson121
Created March 24, 2014 10:06
Show Gist options
  • Save epson121/9737569 to your computer and use it in GitHub Desktop.
Save epson121/9737569 to your computer and use it in GitHub Desktop.
// Some helpful snippets of code to use when debugging magento:
var_export(get_class_methods(get_class($classname)));
var_export(array_keys( $this->getData() )); //or
var_export(array_keys( $object->getData() ));
var_export($object->debug());
// When using with Mage::log()...
Mage::log(var_export(get_class_methods(get_class($classname)), TRUE),NULL,'some_filename.log');
Mage::log(var_export(array_keys( $this->getData() ), TRUE),NULL,'some_filename.log'); //or
Mage::log(var_export(array_keys( $object->getData() ), TRUE),NULL,'some_filename.log');
Mage::log(var_export($object->debug(), TRUE));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment