Enabling XDebug
On this page you will be guided on activating XDebug PHP debugger in Create Magento App application.
Debugging preparations
The browser
You need to install XDebug Helper by JetBrains extension for Chrome to activate the Debugging session in PHPStorm. Instructions are the same for Firefox.

After installation, open extension options and select Debug Trigger value as PHPStorm.

Now, when you open your CMA webpage, you need to enable a debug session by pressing Debug in the extensions menu.

The editor
Go to settings and activate Docker connection. This needs to be done once.
Debugging
First step: Run Create Magento App
Use start command.
yarn start # for Yarn
npm run start # for NPM
Wait for the command to finish.
Second step: Start the debugger
Choose the create-magento-app debug configuration in the top right corner of PHPStorm's window.

Click on Start debugging or press Shift+F9, put test breakpoint in $project_root/pub/index.php file, reload the page and that is all!
Happy debugging!
Last updated
Was this helpful?