How do I var_dump
data in the file controller and Model?
I tried: var_dump
and die
and view source ... but it's not displayed
I rarely use var_dump or echo to the screen when programming Magento. I find it far better to use print_r in conjunction with the Magento logging function.
Add a line like this to your code -
Mage::log("this is my data -\n".print_r($model->debug(),true),1,"mylogfile.log",true);
This will dump the debug data for the model to a log file called mylogfile.log in the var/log directory under Magento's root. The final true parameter to the log function forced the logger to write regardless of Magento's logging setting.