views:

400

answers:

2

Until now, I was debugging my PHP scripts and testcases using vim and the appropiate script with python backing it. However, me and my colleagues need to move forward and vim/gvim is not an option for them.

So I've tried to integrate debugging PHPUnit in Eclipse on my setup as an external tool, which again, works with vim. However, it simply waits for something when I

  1. Launch the new external tool, then
  2. start debugging as a CLI script

Remote debugging is enabled, the environment variable XDEBUG_CONFIG="idekey=ECLIPSE_DBGP_127.0.0.1" is also set.

Any ideas?

Addendum

Running the testsuite works. Debugging a web page works. Debugging a given test doesn't.

Eclipse waits forever for something at 57% when trying to debug a phpunit test. I'd like to provide more information, but it doesn't tell me more either.

A: 

you can launch a debug session by going to the php debug perspective and select from the menu run->debug->debug as php web page or debug php script.

If you use zend studio you can debug as a php unit test.

There is also a firefox extension that helps with debugging with xdebug https://addons.mozilla.org/en-US/firefox/addon/3960

Also make sure go to preferences panel and select php->debug->installed debuggers and click on xdebug then click on configure. There should be an option to allow incoming connections. Select that and you can launch remote debug sessions from firefox.

Brendon
Debugging works, running the testsuite works, debugging **a given test** doesn't work. As for the FF extension, that has nothing to do with my problem, since the tests are CLI scripts by definition.
Flavius
+1  A: 

I have wrote an article about how to get it done launching phpunit unit tests from eclise pdt not using the external tools launcher but the phpunit.php script itself, look here:

http://elespaciodejaime.wordpress.com/2010/04/19/pruebas-unitarias-en-joomla-con-phpunit-y-soporte-para-debugging/

the explanation is at the end, by the way, it is in spanish.

jaime
An English translation would be great, I would also accept this answer.
Flavius
Did you get the debugging working? to stop me translating that article ;)
jaime