I usually var_dump object->getData() in my module to see what's it it. Because of the injection dependencies , it looks like i cannot do that anymore. When i try it, nothing is printed out, which is likely because the amount of data connected to it is too large??? Can someone suggest an easy way to debug object in Magento 2? Thank you
Xdebug is the way to go. You can use Phpstorm in conjunction with Xdebug to pause execution of the code at designated break points and explore ALL data. I use it on Magento 2 every day.
In fact, I made a series of videos on how to install and configure
I hope this helps to get you going in the right direction!
You can use this method for log :
$om = \Magento\Framework\App\ObjectManager::getInstance(); $storeManager = $om->get('Psr\Log\LoggerInterface'); $storeManager->log(100,print_r($priceValue,true));
Here "$priceValue" is the object which you want to print.