![]() Additionally, you can set up several ones if you want. Then go to Servers and set up a debug server. In PhpStorm windows, you need to go to File -> Settings -> Languages & Frameworks -> PHP and set the CLI interpreter Set the correct CLI Interpreter for Php In order to use Xdebug to debug Magento 2, you have to setup it with your IDE (in our case it is PhpStorm). Now take a look again at phpinfo, if you can see this part then it is configured correctly Your Xdebug configuration Setup XDebug with PhpStorm You will need to restart apache to apply the changes: ![]() If you are running on php 7 then it would be /usr/lib/php7/20131226/xdebug.so The number might change depending on your machine. ![]() One thing worth mentioning is the zend_extension variable. Go there and paste the following code into the end of the file Check your info.php again, look for this line where you can get the php.ini file location. ![]() However, we need to add some config script to set up Xdebug locally. Now to install Xdebug, open the terminal and type in the following command: Then go to 127.0.0.1/info.php, and the following screen should display: A sample Phpinfo page Install XDebugįrom now on we assume you have your web server running Ubuntu locally on /var/there, with the content: Ready? Let’s start with the most important thing: Install XDebug. Also, note that the IDE we use in this article is PhpStorm. ![]() In this article, we will try to install and configure Xdebug, since it is more popular and easier to use. To debug Magento 2 code, you can use either XDebug or Zend Debug. Predictably, correctly debugging your application will save you tons of time and effort. Some developers like to log things out, some like to print it right on the screen, but most prefer run-time debugging. Debugging is critical in the development process of any system. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |