phpstorm 7.1.3: zero-configuration php debugger does not work

I followed the instructions in http://confluence.jetbrains.com/display/PhpStorm/Zero-configuration+Web+Application+Debugging+with+Xdebug+and+PhpStorm?_ga=1.103683840.107492228.1404018833 to debug drupal 7 module. the "incoming connection dialog from xdebug" dialog does not show up. xdebugger log message shows

Log opened at 2014-07-15 15:29:40

I: Connecting to configured address/port: 127.0.0.1:9000.

E: Could not connect to client. :-(

Log closed at 2014-07-15 15:29:40

although I can telnet to 127.0.0.1:9000:

[handongw@torlx-handongw www]$ telnet -e p localhost 9000

Telnet escape character is 'p'.

Trying ::1...

telnet: connect to address ::1: Connection refused

Trying 127.0.0.1...

Connected to localhost.

Escape character is 'p'.

p

telnet> quit

Connection closed.


I have being stuck for two days w/o progress. Any suggestion is welcomed.

PS: more details of my environement and configuration:

  • phpstorm 7.1.3, Drupal 7.28, Centos 6.3, PHP 5.4.30,

PHP 5.4.30 (cli) (built: Jun 25 2014 15:27:51)

Copyright (c) 1997-2014 The PHP Group

Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

    with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans

  • i installed xdebugger based on the customized installation instruction at http://xdebug.org/wizard.php
  • I am using in-place drupal module project (my project is under document root)
  • I use xdegger help chrome extension to enable debugging. I tried jetbrain's bookmarklet too.
  • no other debugger configuration is configued.

/etc/php.ini settings:

xdebug.remote_enable=On

xdebug.remote_host=127.0.0.1

xdebug.remote_port=9000

xdebug.remote_handler="dbgp"

xdebug.remote_mode=req

xdebug.remote_autostart=On

xdebug.idekey=PHPSTORM

xdebug.remote_log=/var/www/xdebug.remote.log

xdebug.profiler_output_dir = "/tmp/xdebug/"

xdebug.profiler_enable = Off



5 comments
Comment actions Permalink

forgot to mention:

  • i set breakpoints in both my drupal module code and includes/bootstrap.inc.
0
Comment actions Permalink

This looks more like a xdebugger defect, similar one could be found at http://bugs.xdebug.org/bug_view_page.php?bug_id=00001040. However the incident was resolved in xdebugger 2.2.5, which is what I am using now. i will dig a bit more on xdebugger side instead of phpstorm.

0
Comment actions Permalink

xdebugger 2.2.5 seems have similar issue too: http://bugs.xdebug.org/view.php?id=1060

I may need to try zend debugger.

0
Comment actions Permalink

Have you tried xdebug 2.3.0dev ?

0
Comment actions Permalink

I debugged xdebug_com.c. it failed at this statement

status = connect(sockfd, (struct sockaddr*)&address, sizeof(address));


with errno "Permission denied". the root cause is that Centos 6.3 does not allow httpd to make tcp connection by default.
I need to run sudo setsebool -P httpd_can_network_connect=1 to get it work!

0

Please sign in to leave a comment.