Breakpoints not firing with XDebug

I just started out using PHP storm and am not that familiar with Apache so bear with me.  I am using Instant Wordpress to develop Wordpress sites on my desktop.  Instant Wordpress comes with MySQL and Apache built in so you just start it up and it creates a Wordpress instance at  I am using PHP Storm to edit the files in my custom theme folder in the Wordpress installation.  I'm trying to get XDebug to work for debugging.  

The XDebug DLL is already installed in a subfolder of the PHP folder and I have changed my PHP.INI file so that then I run a phpinfo() command in a test PHP file, it is reporting that XDebug is set up.  This is what I have in my php.ini file:

xdebug.remote_host = ""

I have set up the Server in PHP Storm to point to port 4001 and created a Run configuration in  PHP Storm, called IWP, using PHP Web Application.  I have hooked the run configuration in to the server which I have already set up.  I have attached screenshots of my Project settings - Servers and Deployment Mapping tab.  Also my run configuration setting.

When I click Run - Debug IWP the browser fires up and goes to the URL:{large number}

I can see a new debugging session starts up in PHP Storm.  However any breakpoints that I set in the PHP files are not hit.  I also tried ticking "break at first line in PHP scripts" but that also doesn't seem to hit anything.  Can anyone tell me what might be wrong or where to look?  Thanks

1 comment
Comment actions Permalink

Hi Lars,

Few mistakes/notes:


xdebug.remote_host = ""

The "" part is wrong -- should be just IP ( or host name (localhost)

2) NOTE: Debugging and profiling at the same time does not make much sense -- you should really use only 1 of them at the same time (when debugging, script may execute 10/100/1000 times longer than normally, therefore profiling in such case will mean nothing)

3) NOTE: Deployment settings/mappings have nothing to do with debugging

4) Settings | PHP | Servers (your Server.png image) -- the data in "Absolute path on the server" is wrong:
  a) you are executing PHP on local server, therefore there should be Windows paths
  b) most likely you do not need to setup any mapping at all since you are executing it on the same computer and OS where PhpStorm is installed (unless, of course, you are using symbolic links in those paths)

My suggestion:
1) Untick "Use path mapping..." on that server settings page and try to debug
2) If that does not help:
  a) Delete such entry completely
  b) Delete that Run/Debug Configuration
  c) Activate "Run | Start Listen PHP Debug Connections"
  d) In browser, navigate to the website
  e) Using bookmarklets, (Start Debugger one), activate debug session (set debug cookie) and reload the page
  f) PhpStorm should show you popup window asking for path mapping (assuming that you have breakpoint setup already) -- point to correct location. It should create entry in "Settings | PHP | Servers" with correct mappings (you can compare it later to what you had)

Check this link for some articles, in particular Zero-Configuration debugging with PhpStorm 2.0 (in case you have not seen it yet)

Let me know how you are doing.


Please sign in to leave a comment.