Hello @peter_maged1
You should use xdebug for Magento 2.
https://magehit.com/blog/how-to-configure-xdebug-for-magento-2-development/
https://medium.com/@mailtoankitgupta/remote-debug-magento-server-using-phpstorm-xdebug-30ba2c79e9b6
https://www.mgt-commerce.com/documentation/mgt-development-environment-xdebug
Or check this if this will help you:
https://firebearstudio.com/blog/how-to-debug-magento-2.html