![]() If you’ve done everything correctly, you should see the following screen:īefore configuring the debugger, you need to return to the home screen and create new project. Then you need to choose Empty PHP project and make sure that the location of the project is in htdocs folder in XAMPP.Īfter that you need to create a new php file inside your project. Restart XAMPP and run the Apache and MySQL modules again. Zend_extension = "C:\xampp\php\ext\php_xdebug-2.6." If everything is alright, you should see this: In order to do that, you need to find your XAMPP folder and choose the " php" directory and in it select php.exe On the default interpreters page, you need to click the green plus and press Local Path to Interpreter. You need to choose the PHP Executable now. You need to change the PHP version to your installed PHP version:Īfter that you need to change the PHP Interpreter. If you have started PhpStorm before, you need to either close your current project using File -> Close Project option or simply skip this step and go to File -> Default Settings.Īs you can see in the picture, you need to go to the settings menu.Ħ. Once we are in the settings menu you need to go to Languages & Frameworks tab and select PHP. Now, you need to connect the Debugger (Xdebug), Apache Server and MySQL DB (XAMPP) to PhpStorm:ĥ. You need to exit the program that holds port 80, and the Apache server will start. If you have Skype or a torrent client running, the Apache server will not start. If everything is correct, the Apache label will become green, and you will see the default ports – 80. After you choose the language you prefer, you will see the main screen of XAMPP.Ĥ. The first time you start XAMPP you will get language selection screen. Install XAMPP in the default directory C:\xampp, or you might encounter permission troubles later on.ģ. However, it’s quite worth it when you see how easy it is to debug your code with it.First you need to install and configure XAMPP and integrate it with PhpStorm (4 steps):Ģ. Although simple with instructions, installing and configuring Xdebug on your own can be a pain. Here we can see that our code stoped executing on the breakpoint and that we have an option to inspect the variables we have. Let’s put a breakpoint somewhere in our code to see if it actually works. Hit apply and now we are ready to test our code. Then under DBGp Proxy as ide key set PHPSTORM and port to 9001 to match the settings we added in php.ini. Now open settings (File -> Settings) and change the Xdebug settings as follows. Here we specify the 127.0.0.1 domain and 8000 port on which Laravel serves. In the top right corner click on add configuration.Ĭlick on the plus icon and select PHP Web Page.Įnter the name and click on the button with three dots. Now we need to restart apache service in order for it to use new configuration. Zend_extension = C:\xampp\php\ext\php_xdebug-2.7. Update C:\xampp\php\php.ini and change the line zend_extension = C:\xampp\php\ext\php_xdebug-2.7.Īfter I copied xdebug dll to its proper place I added the following configuration to the php.ini file at the same location as instructed in the third step above.Move the downloaded file to C:\xampp\php\ext.When it finishes it will give you an appropriate version of xdebug to download and provide you with the instructions of where to put it. Once you get the output copy it into the text area on the website and click analyze. I will use php -i from the command line terminal. You can choose whichever option is easier for you. What we have to is to paste either the output of phpinfo() or php -i from the terminal. We will use official xdebug tailored installation on this website. This article will cover how to configure xdebug with xampp on Windows. Xdebug will help us discover the source of the problems in our code and give us a better insight on what is happening. No one should ever underestimate the importance of a fully set up development environment and none is complete unless you have proper error debugging tools in place.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |