![]() Now all you have to is set a breakpoint and reload your page. Let’s say you want to install MongoDB from their official repositories. The package index is a database that holds records of available packages from the repositories enabled in your system. Go back to PhpStorm, and instruct it to listen to incoming debug connections by clicking on the “Listen PHP debug connections” button By default, on ubuntu 18.04 and newer the add-apt-repository will also update the package index if the repository public key is imported. Use your preferred extension to activate Xdebug for the page you’re on. All you have to do is click on the “Accept debug connections” button, and activate Xdebug by using a browser extension. Switch to the computer where PhpStorm is installed, and open your project. Now we restart apache so that the new configuration is taken into account: sudo /etc/init.d/apache2 restartĪnd we that we are done on the server side of things Prepare PhpStorm Xdebug.remote_port = 9000 #this is the default, leave it as is Xdebug.remote_host = 192.168.1.83 #change this IP adress for the one of the computer you are typing on This is what we’re going to add: xdebug.remote_enable = On #this enables remote debugging Within this file, there will be a single line, referencing the xdebug zend extension, something like this (the path can vary slightly) zend_extension = /usr/lib/php5/20090626/xdebug.so gksu gedit /etc/apache2/conf.d/xdebug.ini you can copy/paste the command below in the terminal, or do it your own way. You’ll need to open this file for editing as root, as we need to make a few changes in there. Setup Xdebug on serverĭone? Right, so this created a config file in /etc/php5/conf.d called xdebug.ini, which is read by php and contains xdebug’s configuration options. This will also install Apache and PHP if you don’t have them already. On Ubuntu and Debian, it couldn’t be easier: just open a terminal and type sudo apt-get install But don’t worry: it retrospect, it’s not that difficult at all. It took me… a few months to finally find the time figure out how to set up everything properly, so I hope this post can help someone, somewhere. WebIde100 (If it is hidden click Ctrl + H to show hidden files.) There open the terminal and delete this folder. The advantages are immediately obvious: as soon as the connection from Xdebug is successful, you are blinded by variable inspection, code stepping, breakpoints, etc… Debugging heaven! It is easy to completely uninstall any version of PHPStorm in Ubuntu by following these instructions. Remote debugging with Xdebug and PhpStorm on Ubuntuīeing able to debug your php application right from your IDE is something that you can’t fully realise the power of, unless you’ve tried it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |