Enabling XDebug
On this page you will be guided on activating XDebug PHP debugger in Create Magento App application.
Last updated
On this page you will be guided on activating XDebug PHP debugger in Create Magento App application.
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.

This extension sets a cookie in your browser's requests: XDEBUG_SESSION=PHPSTORM. This cookie enables debugging in your browser.
Sometimes, you may want to enable debugging outside of the browser (for example, to debug individual GraphQL requests). You can also set XDEBUG_SESSION=PHPSTORM manually in the Cookie header. Most HTTP and GraphQL clients support this option.
Now, when you open your CMA webpage, you need to enable a debug session by pressing Debug in the extensions menu.

Go to settings and activate Docker connection. This needs to be done once.
Install PHP Debug extension.
Use start command.
Wait for the command to finish.
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!
Open debugging tab in VSCode (Ctrl + Shift + D) and select Listen for Xdebug configuration.

Click on Start debugging (or press F5), put the test breakpoint in $project_root/pub/index.php file, reload the page and that is all!
Happy debugging!
Last updated
yarn start # for Yarn
npm run start # for NPM