Do we need to include the class in the constructor?
In Magento 1, we simply use zend_debug::dump()->debug to debug object, how about for Magento 2?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
You can use simply following way:
You can also import
Zend_Debug class at the top of your class file:
Then, your code will work as normal:
OR, you can directly instantiate the object of the class. For this, you don't need to import the class but have to use "backslash" infront of the
Zend_Debug class name.
Reference: PHP Documentation on Using namespaces: Aliasing/Importing
Zend_Debug gone from 2.3
Action: Affected modules and classes were removed.
Reason: They are no longer used in Magento or Marketplace extensions, are expensive and time-intensive to maintain, and can cause potential security risks if not maintained properly.