PHPStorm Debugging stopped...

I updgraded yesterday to Lion 10.7.3 and noticed that doing so, my debugging coincidently stopped working.  

I've tried several time to re-initialize debugging sessions, resetting configurations, reloading the little bookmarklets, ... everything... I even r&r'd xdebug...

With first-line debugging on, I get a debug-window message in the IDE that briefly says that it's waiting for a connection with some random integer value...then I get the pink message at the bottom that tells me it can't connect to the debugger.... Browser-initiated sessions just run -- never connect.

Using PHPStorm 2.1.4...

So, any information on xdebug/phpstorm playing nice with 10.7.3 Lion?  Any ideas on getting this working again?

Lost half-a-day yesterday trying to figure this out (again)...there's GOT to be an easier way.

Thanks...

0
16 comments

I set-up my index.php script as an entry point for the debugger-run -- with breakpoint set to the first line...

cannot connect to xdebug...


no xdebug logfiles are being generated...

0

Hello Micheal,

Sorry for delay.

no xdebug logfiles are being generated...

Did you enable 'xdebug.remote_log' option (see http://xdebug.org/docs/remote#remote_log)? Please check you phpinfo() output.

Thank you for feedback!

0

Remote logging enabled...it was working prior to the 10.7.2 update, just like everything else...

I get the (very) brief message in the debug window that it's waiting for a session with a key {intvalue} before I get "cannot connect to the debugger..."

xdebug support enabled
Version 2.2.0-dev

Supported protocols Revision
DBGp - Common DeBuGger Protocol $Revision: 1.145 $


Directive Local Value Master Value
xdebug.auto_trace Off Off
xdebug.cli_color 0 0
xdebug.collect_assignments Off Off
xdebug.collect_includes On On
xdebug.collect_params 0 0
xdebug.collect_return Off Off
xdebug.collect_vars Off Off
xdebug.coverage_enable On On
xdebug.default_enable On On
xdebug.dump.COOKIE no value no value
xdebug.dump.ENV no value no value
xdebug.dump.FILES no value no value
xdebug.dump.GET no value no value
xdebug.dump.POST no value no value
xdebug.dump.REQUEST no value no value
xdebug.dump.SERVER no value no value
xdebug.dump.SESSION no value no value
xdebug.dump_globals On On
xdebug.dump_once On On
xdebug.dump_undefined Off Off
xdebug.extended_info On On
xdebug.file_link_format no value no value
xdebug.idekey root no value
xdebug.manual_url http://www.php.net http://www.php.net
xdebug.max_nesting_level 100 100
xdebug.overload_var_dump On On
xdebug.profiler_aggregate Off Off
xdebug.profiler_append Off Off
xdebug.profiler_enable Off Off
xdebug.profiler_enable_trigger Off Off
xdebug.profiler_output_dir /var/tmp/ /var/tmp/
xdebug.profiler_output_name cachegrind.out.%p cachegrind.out.%p
xdebug.remote_autostart Off Off
xdebug.remote_connect_back Off Off
xdebug.remote_cookie_expire_time 3600 3600
xdebug.remote_enable Off Off
xdebug.remote_handler dbgp dbgp
xdebug.remote_host localhost localhost
xdebug.remote_log 1 1
xdebug.remote_mode req req
xdebug.remote_port 9000 9000
xdebug.scream Off Off
xdebug.show_exception_trace Off Off
xdebug.show_local_vars Off Off
xdebug.show_mem_delta Off Off
xdebug.trace_enable_trigger Off Off
xdebug.trace_format 0 0
xdebug.trace_options 0 0
xdebug.trace_output_dir /var/tmp/ /var/tmp/
xdebug.trace_output_name trace.%c trace.%c
xdebug.var_display_max_children 128 128
xdebug.var_display_max_data 512 512
xdebug.var_display_max_depth 3
0

relevant php.ini info:

[xdebug]
xdebug.remote.enable = 1
xdebug.remote_host = localhost
xdebug.remote_port = 9000
xdebug.remote_log = On

[Zend]
zend_extension = /usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so

0

Hello Micheal,

Please note that the value of the xdebug.remote_log option should be a path in your local file system. See http://xdebug.org/docs/remote#remote_log.
Please set a correct value and provide a log.

Thank you for feedback!

0

Hi Nikolay,

Setting the xdebug.remote_log had no effect...

It wasn't set before, when it was working, just to let you know...everything quit working after the 10.7.2 update...

I have a simple index.php script and when I attempt to run the the debugger (Shift+F9), I get the "waiting for key from ide with value xxxx" message flashes up (so quickly I can't get exact verbiage) before the "debug connection with xdebug was not established"....and there's nothing in the xdebug log file.

Executing with debug-mode on from the browser has no effect.  I have a cookie set under XDEBUG_SESSION with the following values set:

Name: XDEBUG_SESSION
Content: LL2PHPSTORM
Domain: ll2api
Path: /
Send For: Any kind of connection
Accessible to Script: Yes
Created: Wednesday, October 19, 2011 4:37:44 PM
Expires: Wednesday, October 19, 2011 5:37:44 PM


I've gone around in circles so much on this...is there an easy way to zero-state the debugger settings and then start-over?

What's the best tutorial document to set this up for this release?  (2.1.5 PHPStorm and OS X 10.2.7)

Thanks!


--mike
0

Ran a quick test from the command line using this script to show that my installation xdebug is working:

<?php
echo xdebug_time_index(), "\n";
for ($i = 0; $i < 250000; $i++)
{
    // do nothing
}
echo xdebug_time_index(), "\n";
?>


And got the expected output:

0.00115990638733
0.034453868866





wierdness deluxe continues to be 0-bytes written to my xdebug.log file...


Also, I tried connecting to xdebug from netbeans but that failed too...

Thinking more seriously about Apple's 10.7.2 and XCode updates as root cause...has anyone on your end gotten the debugger working with this (new) environment?


Thanks...
0

Hello Micheal,

First of all please note that script running from command line and script running on a server usually use different php.ini files.


Also please try to use the latest stable version instead of development.

Thank you for feedback!
0

I know that, thanks.  I've not got a separate ini file for my cli php -- it's showing the same dump info...and I'm still on 2.1.5 for the IDE...I tried the 3.0 EAP to see if I could isolate the issue to the IDE but it didn't work there either.

Still waiting to hear if anyone's gotten this working on 10.7.2 with the XCode update...

Thanks!

--mike

0

Micheal,

I mean stable version of Xdebug.

Thank you for feedback!

0

ooo - nice catch...

ok - so re-compiled and installed xdebug so that I have the below config reported via the browser....

and still the same responses from the IDE -- waiting for the incoming IDE connection with value {x}...then: Debug connection with Xdebug was not established...nothing in the debug log...




xdebug support enabled
Version 2.1.2

Supported protocols Revision
DBGp - Common DeBuGger Protocol $Revision: 1.145 $

Directive Local Value Master Value
xdebug.auto_trace Off Off
xdebug.collect_assignments Off Off
xdebug.collect_includes On On
xdebug.collect_params 0 0
xdebug.collect_return Off Off
xdebug.collect_vars Off Off
xdebug.default_enable On On
xdebug.dump.COOKIE no value no value
xdebug.dump.ENV no value no value
xdebug.dump.FILES no value no value
xdebug.dump.GET no value no value
xdebug.dump.POST no value no value
xdebug.dump.REQUEST no value no value
xdebug.dump.SERVER no value no value
xdebug.dump.SESSION no value no value
xdebug.dump_globals On On
xdebug.dump_once On On
xdebug.dump_undefined Off Off
xdebug.extended_info On On
xdebug.file_link_format no value no value
xdebug.idekey root no value
xdebug.manual_url http://www.php.net http://www.php.net
xdebug.max_nesting_level 100 100
xdebug.overload_var_dump On On
xdebug.profiler_aggregate Off Off
xdebug.profiler_append Off Off
xdebug.profiler_enable Off Off
xdebug.profiler_enable_trigger Off Off
xdebug.profiler_output_dir /var/tmp/ /var/tmp/
xdebug.profiler_output_name cachegrind.out.%p cachegrind.out.%p
xdebug.remote_autostart Off Off
xdebug.remote_connect_back Off Off
xdebug.remote_cookie_expire_time 3600 3600
xdebug.remote_enable Off Off
xdebug.remote_handler dbgp dbgp
xdebug.remote_host ll2api ll2api
xdebug.remote_log /htdocs/logs/xdebug.log /htdocs/logs/xdebug.log
xdebug.remote_mode req req
xdebug.remote_port 9000 9000
xdebug.scream Off Off
xdebug.show_exception_trace Off Off
xdebug.show_local_vars Off Off
xdebug.show_mem_delta Off Off
xdebug.trace_format 0 0
xdebug.trace_options 0 0
xdebug.trace_output_dir /var/tmp/ /var/tmp/
xdebug.trace_output_name trace.%c trace.%c
xdebug.var_display_max_children 128 128
xdebug.var_display_max_data 512 512
xdebug.var_display_max_depth 3 3
0

Micheal,

I still see mistakes in your php.ini settings:

  • 'xdebug.remote_enable' option should be enabled
  • The value of 'xdebug.remote_host' looks incorrect. Most likely it should be 'localhost'. (if your server and PhpStorm running on the same machine).
  • It is better to set default value for the 'xdebug.idekey' option(e.g. 'PHPSTORM')
  • The value of the 'xdebug.remote_log' looks suspiciously - it should be an absolute path on your machine. Do you really have 'htdocs' directory under the root?


Thank you for feedback!

0

Morning Nickolay,

* 'xdebug.remote_enable' option should be enabled


I've completely disabled the xdebug.ini file and am loading xdebug params from the php.ini file.  Even though I have remote_enable set to 1, it still shows as Off in the phpinfo() output.

xdebug.remote_enable Off Off


According to Xdebug man page, is the connection cannot be established, the script will continue as if the value was set to 0.  Is this why the remote_enable is showing as Off?

* The value of 'xdebug.remote_host' looks incorrect. Most likely it should be 'localhost'. (if your server and PhpStorm running on the same machine).
* It is better to set default value for the 'xdebug.idekey' option(e.g. 'PHPSTORM')
* The value of the 'xdebug.remote_log' looks suspiciously - it should be an absolute path on your machine. Do you really have 'htdocs' directory under the root?


I've changed the remote_host value to "localhost" in the php.ini and in the PHPStorm configuration.  I am runnning everything off my laptop.

xdebug.remote_host localhost localhost


I've also reset the value for idekey back to the default: 'PHPSTORM'.  What's interesting here is that the change does not propogate to the local value:

xdebug.idekey root

PHPSTORM



I reset the remote_log to a path with my source base just to test that the reset is working:

xdebug.remote_log /htdocs/LL2/trunk/services/logs/xdebug.log /htdocs/LL2/trunk/services/logs/xdebug.log


but there is still zero output to the debug log when I proc debugging from either PHPStorm or from the browser.

I have (within PHPStorm) Xdebug Proxy as:

IDEkey:  PHPSTORM
Host: localhost
Port: 9000

I ran my phpinfo() output through the xdebug checker:

  • Xdebug installed: 2.1.2
  • Server API: Apache 2.0 Handler
  • Windows: no
  • Zend Server: no
  • PHP Version: 5.3.8
  • Zend API nr: 220090626
  • PHP API nr: 20090626
  • Debug Build: no
  • Thread Safe Build: no
  • Configuration File Path: /opt/local/etc/php5
  • Configuration File: /opt/local/etc/php5/php.ini
  • Extensions directory: /opt/local/lib/php/extensions/no-debug-non-zts-20090626


  • And I generated new bookmarklets...

    When I attempt a debugging session, I still get the same errors:  waiting for IDE connection with Key: {integer} (it flashes very quickly so not sure about exact verbiage) and then the pink message "Debug connection with Xdebug was not established"

    When I launch from the browser, the app just runs in-window and never flips focus back over to PHPStorm.


    Thanks for all your help, Nickolay -- I know this is a huge pain...

    --mike
    0

    Micheal,

    Xdebug debugging functionality completely dependent on 'xdebug.remote_enable' option (logging won't work when option is disabled).
    Ensure that the option is enabled in your script (check the value of the 'ini_get('xdebug.remote_enable')' call).
    Also please try to use latest PhpStorm EAP build (we provided debugging autoconfiguration there) with your stable version of Xdebug.

    Thank you for feedback!
    0

    Hey Nickolay --

    As usual, thanks for your patience and perseverance.

    I got xdebug.remote_enable setting to finally be on and my debugger is back!  In all fairness to you and your product, the problem was a typo in my php.ini file:  xdebug.remote.enable != xdebug.remote_enable.  Geh.  PBCK.


    So life is awesome again -  thanks again for all your help and willingness to deal with this issue for so long!

    You're the best!

    --mike

    0

    Micheal,

    You're welcome!

    Thank you for feedback!

    0

    Please sign in to leave a comment.