What is the typical way to debug web applications?

I'm trying out PHPStorm after using Zend Studio for about a year and it seems like PHPStorm goes about debugging sessions differently.  I'm at a loss at the moment because I'm not even sure what the debugging workflow is supposed to be for PHPStorm, so I'm not sure what I have configured correctly or incorrectly.

I'll explain how I've done it in Zend Studio and how I'm currently using PHPStorm below, but my question is what are the various methods to debug with PHPStorm (especially if I need to specify URL parameters)?  Basically what are the various workflows from a broad sense so I know what to strive towards while configuring my setup?  The way I have it setup seems very clunky and not conducive to web applications which leads me to believe I either have it setup incorrectly or I'm using it incorrectly.  I have followed multiple tutorials, but none seem to indicate that it is specifically for debugging web applications.  I'm running on Zend Server with Zend Debugger.  I have remote SSH successfully configured (I'm connecting at least) and can debug applications as if they were CLI, but not web applications.  I also see an option to specify CLI arguments, but nothing for non-cli apps.

Some links I've referenced:

In Zend Studio I just had to make sure my server was configured correctly, then point Zend Studio at my server.  Assuming all settings were correct I open up the file I wanted to debug and then hit the "Debug" button.  A prompt would pop up asking me to confirm the URL I want to debug.  This prompt would default to the web path of the file, but in this prompt I was able to specify URL parameters as well.  I hit "Okay" and then the web page would open in a Zend Studio window and I could continue debugging. The debugger ran without using php cli (IE: the $_SERVER array was set as if I was visiting via a browser)

The way I have PHPStorm setup is similar, but I don't have an option to specify URL variables and it seems to use PHP CLI because the $_SERVER array is not set as if I was visiting the page via a browser.  Additionally I understand there is a PHPStorm extension for Chrome which I installed, but I'm not sure what role this plays or if I'm using it correctly (or at all).  I have also read and bookmarked a series of links from here, but again I have no idea of their role or if I'm using it correctly (or at all).  Sometimes they cause the page to refresh, other times they do nothing.

If there is a link/tutorial/video which explains all of this I apologize for posting this question, but I really have tried searching without much luck.  I would appreciate the link or a point in the right direction and I'll play around with this some more on my own.  

Many thanks in advance,


Hi there,

PHP debugging tutorials: https://confluence.jetbrains.com/display/PhpStorm/Debugging+with+PhpStorm

If you want to debug specific script with specific parameters (and be able to repeat/launch this request from IDE) -- use Run/Debug Configuration of "Web Application" type (alt: PHP HTTP Request or even via REST Client).

If you want to debug any web page "live" (as in: you are clicking "next page/submit form" button or some link on a page and it takes you to debugger) -- try "Zero-Config" approach (activate "phone-handle" icon in PhpStorm (so it listens for incoming debug requests) and then just set the xdebug cookie in a browser (be it via bookmarklet or xdebug browser extension etc)

If you want more videos -- just search "phpstorm xdebug" on youtube -- there are quite a few manuals from different people there. Not sure about "zend debugger" videos like that.


I, personally, use xdebug and have used Zend Debugger only once few years ago -- cannot suggest anything specific for this tool.


Tomorrow (in my time zone, at least) -- 6th of October -- join webinar -- https://blog.jetbrains.com/phpstorm/2016/09/webinar-step-into-debugging-with-phpstorm/


>Additionally I understand there is a PHPStorm extension for Chrome which I installed, but I'm not sure what role this plays or if I'm using it correctly (or at all).

That's for JavaScript debug and alike -- nothing to do with PHP debug


Many thanks, I just signed up for the webinar and will be attending.  Now I know there are two types of PHP debugging and how they should work and what I should be striving for.  I'll try to review the video you provided prior to the webinar (it's only an hour from now) to bring me up to speed as much as possible.

Vladimir Luchansky


There is also a workshop project available at GitHub: https://github.com/JetBrains/phpstorm-workshop .

Simple debugging scenarios are also covered there along with lots of other PhpStorm functionality so I would advise to check this as well.


Thank you Vladimir Luchansky, I just bookmarked the project and will go through it as soon as I can.  I think I figured out debugging between Andriy Bazanov's answer and the webinar.  But I'm really interested in learning the keyboard shortcuts and other aspects as well.  


Please sign in to leave a comment.