Wanted to expand a little on your setup for debugging.įor Google Chrome you have the "xDebug helper" (here: )Ĭhrome also has the extension Postman, which installs on your pc as an application, allowing you to send requests (GET/POST/PUT/UPDATE/etc) (here: ).įor FireFox you have the same as you mentioned (The Easiest xDebug).ĭebugging, once enabled in PhpStorm can also be enabled manually (this method is required to debug with Postman) by adding this to the URL: ?XDEBUG_SESSION_START=PHPSTORM I would imagaine, that it will do that for anybody. Switching to PhpStorm vastly improved my productivity. That will initiate the debugging session for you and PhpStorm will stop on a breakpoint if one is set. If the bug is green, it will send a special cookie to the server during a page load request: There are a number of ways of starting a debug session, but for Firefox users there is an excellent add-on The easiest Xdebug.
To make the choice between debugging and not debugging can be made really easy. It will return a long list of things, but one of the entries must be similar to that. Proto Local Address Foreign Address State PID
On Windows, run this on command prompt to confirm: If your debugger does not work, you fumbled the settings or your listener is not enabled. If you're running a single machine setup, that won't be necessary.Īny settings for the setup can be found in the PhpStorm project:īut I think they're ok as a default.
On the PhpStorm end all you have to do, is enable the listener:Īlso I had to drill a hole into my Windows 7 firewall, to allow my web server to connect into TCP/9000. There reference for all the configuration directives can be found from Xdebug's docs. That enables the server side to initiate a DBGP-connection to the given client (PhpStorm) and start sending data there. On the server end I have a PHP-fpm running, it has I don't think the zero-configuration part is true, but it is almost zero anyway. There is a very good article on PhpStorm author's web site with name Zero-configuration Web Application Debugging with Xdebug and PhpStorm. In my case, my web server is on a Linux and I typically work on a Windows 7. PhpStorm has all the client-stuff built into it, the only thing that is needed is Xdebug-extension to the server end. Since that it has become my weapon of choice for PHP.įor example, debugging the application is very simple operation. For years I used Notepad++, but then I got a recommendation for JetBrains PhpStorm. Since many of my projects involve PHP, that is not the optimal editor for that.
#Phpstorm debug php software#
IMHO one of the best editors for a software developer is Microsoft's Visual Studio.
#Phpstorm debug php code#
I've written code with a number of text editors (including vim and notepad), some of them really bad and some of them more suited to the task at hand. With computers and programming, the tools you're using is a good starting point.
#Phpstorm debug php how to#
Anybody who has reached a certain level of skill in software development eventually will start thinking about how to make the job easier or be more productive during the day.