How to debug console in Magento

Do you use xDebug for Magento 2 development ? Do you miss it in case of install or upgrade scripts ? In case you using docker for development, you are on right place.

All you need to do, while you are running setup:upgrade console command is to put this code in front of it

XDEBUG_CONFIG=idekey=[xDebug key]

Where [xDebug key] is key which you are using for xDebug identification. So in case you are using key “phpstorm”, you complete console command will be 

XDEBUG_CONFIG=idekey=phpstorm php bin/magento setup:upgrade

This article is based on article from  magentoformat.com 

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.