Some background:I am trying to debug a component(JoomShopping) which is not working correctly after I migrate 2.5 to 3.7 (I followed their migrate instruction and didn't encounter any problem during the upgrading process, but when I go to some certain page, there is a 1054 database error)
Question: In my past experiences I can put var_dump anywhere to see the value of a variable. But this time it doesn't output anything. For example, I am trying to debug the 3rd item in the above picture(attribut.php):
class JshoppingModelAttribut extends JshoppingModelBaseadmin{ protected $tableFieldOrdering = 'attr_ordering'; public function getNameAttribut($attr_id) { $db = JFactory::getDBO(); $lang = JSFactory::getLang(); $query = "SELECT `".$lang->get("name")."` as name FROM `#__jshopping_attr` WHERE attr_id = '".$db->escape($attr_id)."'"; $db->setQuery($query); return $db->loadResult(); } public function getAllAttributes($result = 0, $categorys = null, $order = null, $orderDir = null){ $lang = JSFactory::getLang(); $db = JFactory::getDBO(); $ordering = "A.attr_ordering asc"; if ($order && $orderDir){ $ordering = $order." ".$orderDir; } $query = "SELECT A.attr_id, A.`".$lang->get("name")."` as name, A.attr_type, A.attr_ordering, A.independent, A.allcats, A.cats, G.`".$lang->get("name")."` as groupname FROM `#__jshopping_attr` as A left join `#__jshopping_attr_groups` as G on A.`group`=G.id ORDER BY ".$ordering; extract(js_add_trigger(get_defined_vars(), "before")); $db->setQuery($query); var_dump($db); //debug $list = $db->loadObjectList(); ....... The var_dump doesn't output anything. Why is this?
Also I want to ask why this 1054 error doesn't get logged in PHP's error_log? More importantly, how do I efficiently debug this component? (I post a question in the component's forum but I doubt I would get much help from there)