Trouble getting Xdebug zero-config to work correctly.

I've been at it for many hours and still no luck.

I've tried everything from the help documentation, this forum, and various blog posts.  I'm pretty positive I've done everything right.

I've been unable to get PHPstorm to detect the connection.

Is there a log of some sort I can post so that someone might be able to help?

Sincerely,

Frustrated

3 comments

Hello Eric,

Is there a log of some sort I can post so that someone might be able to help?

Yes, logs would be useful:
Xdebug log: xdebug.org/docs/remote#remote_log
IDE log: http://devnet.jetbrains.com/docs/DOC-1202

Also could you attach your phpinfo() output?

Thank you for feedback!

0

I had some problems, too. Some things have to be done which are not mentioned anywhere or not explained clear enough. Maybe one of them solves your problem:

Make sure that you load xdebug as zend extension and when you do this, make sure that you use the right method: thread safe or none thread safe.
zend_extension="C:\Program Files (x86)\PHP\ext\php_xdebug.dll" or
zend_extension_ts="C:\Program Files (x86)\PHP\ext\php_xdebug.dll"

extension="C:\Program Files (x86)\PHP\ext\php_xdebug.dll" <- WRONG

Be sure that you have the correct version of xdebug.
Means: Your PHP and xdbug have to match in terms of:
- thread safety
- architecture (32/64 bit)

Check phpinfo() for those info. But don't rely on the infrmation you are presented. In my case I downloaded xdebug as thread safe version and tried to load it correspondingly via "zend_extension_ts". But in fact I had to use "zend_extension" although my PHP and xdebug versions are thread safe. In both cases phpinfo told me that everything is just fine. It just didn't work (what I noticed because xdebug did not open the port for debugging).

Another thing that drove me crazy: the entry file which you are going to debug has to be opened in PhpStorm.
PhpStorm has to know that this file corresponds to the entry file which you are requesting with your browser: index.php, test.php, debug.php or what ever. It's possible that you have to configure the path mappings in [Settings]->[PHP]->[Servers].

I hope that helps.
Goog luck :)

0

Hello Christian,

Thanks for sharing!

Make sure that you load xdebug as zend extension and when you do this, make sure that you use the right method: thread safe or none thread safe.

zend_extension="C:\Program Files (x86)\PHP\ext\php_xdebug.dll" or
zend_extension_ts="C:\Program Files (x86)\PHP\ext\php_xdebug.dll"

Since PHP 5.3 you always need to use 'zend_extension'.

Another thing that drove me crazy: the entry file which you are going to debug has to be opened in PhpStorm.

In PhpStorm 3.0(available in EAP, will be released soon. See http://blogs.jetbrains.com/webide/) this behaviour is configurable (if I understand your case correctly):
force_break_when_no_path_mappings.png

Thank you for feedback!

0

Please sign in to leave a comment.