Debugger error - "PHP is not configured for 'Debugging'"

I am using Komodo IDE on a machine that also has a web server that runs the PHP code. I am using remote debugging to connect to that local web server and debug my code.

Remote debugging does work. When I go to a web page on the remote server, Komodo receives the connection and I can debug. After stepping through the code for a while, I get a pause, then I get a dialog box saying “PHP is not configured for ‘Debugging’”. After hitting “OK”, the dialog box pops up again. And again.

Here is my configuration:

I am using CentOS Linux version 7.0.1406 (core).

I am using Komodo IDE: “Komodo IDE, version 8.5.4, build 86985, platform linux-x86_64. Built on Wed Aug 13 18:50:57 2014”

I am using PHP version 5.6.4 that I complied from source.

I downloaded the Xdebug extension “xdebug.so” from Active State: Komodo-PHPRemoteDebugging-8.5.4-86985-linux-x86_64.tar.gz

I followed the install instructions for remote debugging. The web server runs on my local mahcine. This is my php.ini setup.

zend_extension="/usr/local/lib/php/extensions/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
;xdebug.idekey=<idekey>
xdebug.remote_autostart=1

The “xdebug.so” library is also in my installed directory at “/home/joe/Komodo-IDE-8/lib/support/php/debugging/5.6/”

When I go to Edit->Preferences->Languages, it says: “Debugger Configuration: Successfully configured for local PHP debugging.”

phpinfo() on the server also says Xdebug is configured:

xdebug support enabled
Version 2.2.5-komodo 
IDE Key no value 

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

DirectiveLocal ValueMaster Value
xdebug.auto_traceOffOff
xdebug.cli_color00
xdebug.collect_assignmentsOffOff
xdebug.collect_includesOnOn
xdebug.collect_params00
xdebug.collect_returnOffOff
xdebug.collect_varsOffOff
xdebug.coverage_enableOnOn
xdebug.default_enableOnOn
xdebug.dump.COOKIEno valueno value
xdebug.dump.ENVno valueno value
xdebug.dump.FILESno valueno value
xdebug.dump.GETno valueno value
xdebug.dump.POSTno valueno value
xdebug.dump.REQUESTno valueno value
xdebug.dump.SERVERno valueno value
xdebug.dump.SESSIONno valueno value
xdebug.dump_globalsOnOn
xdebug.dump_onceOnOn
xdebug.dump_undefinedOffOff
xdebug.extended_infoOnOn
xdebug.file_link_formatno valueno value
xdebug.idekeyno valueno value
xdebug.max_nesting_level100100
xdebug.overload_var_dumpOnOn
xdebug.profiler_aggregateOffOff
xdebug.profiler_appendOffOff
xdebug.profiler_enableOffOff
xdebug.profiler_enable_triggerOffOff
xdebug.profiler_output_dir/tmp/tmp
xdebug.profiler_output_namecachegrind.out.%pcachegrind.out.%p
xdebug.remote_autostartOnOn
xdebug.remote_connect_backOffOff
xdebug.remote_cookie_expire_time36003600
xdebug.remote_enableOnOn
xdebug.remote_handlerdbgpdbgp
xdebug.remote_host127.0.0.1127.0.0.1
xdebug.remote_logno valueno value
xdebug.remote_modereqreq
xdebug.remote_port90009000
xdebug.screamOffOff
xdebug.show_exception_traceOffOff
xdebug.show_local_varsOffOff
xdebug.show_mem_deltaOffOff
xdebug.trace_enable_triggerOffOff
xdebug.trace_format00
xdebug.trace_options00
xdebug.trace_output_dir/tmp/tmp
xdebug.trace_output_nametrace.%ctrace.%c
xdebug.var_display_max_children128128
xdebug.var_display_max_data512512
xdebug.var_display_max_depth33

AFTER THE ERROR OCCURS, when I go to the preferences section for PHP, it says “Error determining PHP version; you PHP install may be broken, please check the Komodo Error log for more details.”

Here is the error log:

-- EXCEPTION START --
TypeError: widget is null
+ fileName (string) 'chrome://komodo/content/bindings/pane.xml'
+ lineNumber (number) 2311
+ columnNumber (number) 0
+ stack
    setOrientCallback@chrome://komodo/content/bindings/pane.xml:2311
-- EXCEPTION END --
[2015-01-22 15:08:58,902] [ERROR] koAppInfo: PHP command timed out: [u'/usr/local/bin/php-cgi', '-q', '/tmp/tmpbRHdXo.php']
[2015-01-22 15:08:58,902] [ERROR] koAppInfo: could not determine PHP version number for '/usr/local/bin/php-cgi':
----
PHP interpreter did not return in time.
----

Now here is the thing: I only get the error about local debugging not working if I am currently connected to a remote debugging session. The error happens because the PHP interpreter hangs. I can confirm this by trying to execute the same command while Komodo does ("<?php echo(phpversion()."\n"); ?>"): it hangs. As soon as Komodo is done, the command works perfectly.

I DO NOT get the error if I am NOT connected to a remote session, if - for example - the port number I am listening on is something other than what the server is broadcasting on.

I’m not really sure what is going on here. Remote debugging is working, but for some reason, when it is, my PHP interpreter is hanging up when executing the version command for the IDE ("<?php echo(phpversion()."\n"); ?>"). For some reason, Komodo needs to check the configuration and this causes the IDE to think that debugging is not configured and the debugging session to fail, but the remote connection is never broken; it still works. The obvious connection is that the local and remote interpreters are the same. The configuration I am using is supposed to work.

Does anyone have any ideas on this?

I’ve tried to provide as much info as I can. If anything else would be helpful, please let me know.

Thanks.

ADDITIONAL: I’ve tried PHP 5.6.5 - no difference. I’ve also tried compiling xdebug from source with 5.6.4 and 5.6.5 - no change with either.

ADDITIONAL ADDITIONAL: I’ve opened a bug report for this.

Please provide a link to the bug report to the topic.

OK everyone - I have found the problem with this. Part of it went away when I refreshed the xdebug.so file that was on my local machine. The other part appears to occur when the remote debug pane loses focus and you press a function key for a step command. If you reselect the remote debugging session pane and try to step, everything is fine. So I’m not sure if this is normal, but it does not appear to be a bug. I am going to request that the bug report be closed. The bug report is https://bugs.activestate.com/show_bug.cgi?id=106146.