ActiveState Powered by ActiveState

ActiveState Community


wrong php interpreter set for xdebug in linux?

Posted by jyamada1 on 2007-01-19 23:00

hi,

i'm trying to get php debugging working on my ubuntu 6.10 test environment. i installed the apache2, php5, mysql5, and xdebug packages through apt-get. the actual LAMP environment works great and i've been using it for a while. i also think that xdebug works since both the xdebug client and komodo respond to urls with XDEBUG_SESSION_START=1 appended.

now i'm trying to get xdebug working with komodo. even though the preferences dialog says php debugging isn't configured, komodo properly receives the debugging session. however, the debugger doesn't stop at any breakpoints and just runs to completion. when i click on any of the debugger buttons, I get a debugger error message stating "Please correct your interpreter selection in preferences."

i've been searching for alternative interpreters (and i have the alternative php.ini set to /etc/php5/apache2/php.ini (the ini file that shows up in phpinfo.php)). anyone know what to set the interpreter to to make this work?

thanks!

shanec | Thu, 2007-01-25 14:42

What version of Komodo are you running?

The debugger buttons start what is called "local" debugging. This is where Komodo executes PHP directly, rather than going through a web server. For that to work, you need a php executable, and either it needs to be on the path, or you need to point to it in preferences->languages->PHP. Komodo will automatically copy your ini file into (somewhere under) ~/.komodo/4.0/ It will add the xdebug ini vars that are necessary for debugging.

For remote debugging (under apache) I would suggest using the DBGP proxy script (cd Komodo/lib/support/dbgp && python bin/pydbgpproxy). Then in Komodo preferences under Debugging->connection, check the box that tells Komodo to use the proxy. For your PHP configuration, you set the dbgp port to 9000 and ip to the machine that runs the DBGP proxy. Then, use ?XDEBUG_SESSION_START=USERNAME in the url. This way, you have a specific port that XDebug can always connect to, rather than having to change the config after each time you start Komodo. See Komodo Help for more information.

jyamada1 | Thu, 2007-01-25 19:48

thanks for your detailed response. i actually got it working late last night!

the problem was that i had xdebug loading as a normal extension and not as a zend extension. this configuration worked to get xdebug recognized, but not to interact with komodo. so a simple change of the line "extension=xdebug.so" to "zend_extension=/path/to/xdebug.so" was all it took to make the thing work perfectly.

thanks!

-->