PHPStorm with Xdebug on OSX almost working.


Currently I have just setup a PHP 5.4 installation on OSX Lion using the default Apache installation which ships on OSX (default PHP version is 5.3) using:
This works like a charm, it allso setups XDebug. I have just installed a trial for PHPStorm and it looks promising so far. However there is a small problem.

I have created a simple project to test XDebug with two files, index.php and Hello.php in the same directory.

Now the problem is that when I set an breakpoint in index.php on line 8 it works just fine. It breaks on that point and I can see the contents of variables and such, awesome! (Using the 'start listening for PHP debug connections' in PHPStorm and going to http://localhost/ in my browser.)

However when I place a breakpoint in Hello.php which contains a simple class on for example line 10 in PHPStorm and I go to http://localhost/ in my browser nothing happens the script just continues to execute. When I place an xdebug_break() function on line 11 in that file (to imitate a breakpoint) it does stop and I can see variable information. However I would like to be able to place breakpoint using the IDE just like in index.php where it does work correctly.

My XDebug settings are:

Is there something I have not setup correclty?

Thanks in advance.

1 comment
Comment actions Permalink

Hi Matthijn,

How do you initiate Debug process?How those 2 files are related to each other? What that line in 2nd file is (the line where you trying to to setup breakpoint)? -- xdebug can sometimes fail to stop on breakpoint on certain code (e.g when ; is located on another line etc)

The best thing -- capture some video/sreencast showing all the details (corresponding settings, how you run it, successful and failed attempts). This way it can be much easier to understand your setup and identify possible issue (e.g. like this guy did)


Please sign in to leave a comment.