Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

You find a tutorial and the code of a simple lightweight way of testing Joomla 1.5 and Joomla 3.x component here on Github. You can see what changed between testing under Joomla 1.5 and in Joomla 3.x. The examples are based on the use of PHPUnit + DBUnit installed with Composer and configured and run in Eclipse Luna for PHP Developer (PDT).

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top