Xdebug Magento 2 Phpstorm



Why do we need Xdebug?

Xdebug and PhpStorm combination The combination of Xdebug and PhpStorm is one of the best ways to debug Magento 2 store. The main advantage of this method is that it adds breakpoints to the installation process and can help the developer review and change variables at any given time. How To Debug PHP Container With Xdebug And PhpStorm. May 20th 2020 11,692 reads @ifominIgor Fomin. Full stack web developer, tech lead, project manager. You need to set up a 'server' configuration in 'Settings Languages and Frameworks PHP Servers' which maps the paths as seen on the server to the paths in your project. Normally, you would enter a URL into 'Host' and set 'Port' to the HTTP port, e.g. For CLI scripts, the info to put in here will be based on your connection to.

In the development process, we have several existing codes with a number of functionalities. We don’t have to create that functionality from the core every time. We can rather use the existing code and make simple modifications that will save our time and energy. Product development processes work the same. Before modifying the existing code, we need to know how they work and which codes have which functionality.

Now you may have the question, can we see how the PHP code works? It is a virtual object, right?

Absolutely! You can see the flow of the PHP code, and there is a tool. It is called Xdebug. Here we can see how to configure the Xdebug with PhpStorm IDE.

Install Xdebug on Ubuntu using following cmd:

Once you have installed the Xdebug into your system, restart your apache2 server and enable error tracing using the below cmd.

Magento