views:

495

answers:

3

I've been using Eclipse 3.4.2 with PHPEclipse and Zend Debugger for some time without issue. Suddenly, I cannot debug the PHP scripts. I can run them fine but when I select Debug As... the script shows in the Debug window as if it were running, but it is not. If I click pause it reports as being on line 0. I can step through it, if I resume, let it sit and then pause it again it still reports being on line 0.

I've tried closing everything all down, restarting my system, and creating a new project without luck.

I had recently updated the Ubuntu system, but there was nothing related to PHP or Eclipse (that I could tell). XULRunner was updated.

I've checked the Debug Configs, it has the Zend Debugger and the PHP Executable selected as they had been before when working. I've played around with Editing the Source Lookup to make sure it's looking at the right place.

Any ideas?

Edit: eclipse's debugger is listening on port 10000 i can telnet localhost 10000 fine. when i send some garbage characters eclipse pops up an error message about incompatible debugger so it seems to be listening

Edit: I wasn't able to figure out what was really going on but creating a new workspace seemed to do the trick

Update: I tried eclipse -clean (i'm on ubuntu) but that didn't help me. I found the .log file and noticed the following errors. On Startup:

!ENTRY org.eclipse.osgi 2 1 2009-10-05 17:02:11.979
!MESSAGE NLS missing message: DebugConnectionThread_oldDebuggerVersion in: org.eclipse.php.internal.debug.core.PHPDebugCoreMessages

!ENTRY org.eclipse.osgi 2 1 2009-10-05 17:02:11.980
!MESSAGE NLS missing message: DebugServerTestEvent_success in: org.eclipse.php.internal.debug.core.PHPDebugCoreMessages

!ENTRY org.eclipse.osgi 2 1 2009-10-05 17:02:11.980
!MESSAGE NLS missing message: DebugServerTestEvent_timeOutMessage in: org.eclipse.php.internal.debug.core.PHPDebugCoreMessages

After I try to start a debug session:

!ENTRY org.eclipse.php.debug.core 4 10001 2009-10-05 17:02:23.455
!MESSAGE Can't determine version of the PHP executable

!ENTRY org.eclipse.php.debug.core 4 10001 2009-10-05 17:02:23.983
!MESSAGE PHPDebug plugin internal error
!STACK 0
java.lang.NullPointerException
    at org.eclipse.php.internal.debug.core.preferences.stepFilters.DebugStepFilterController.isFiltered(DebugStepFilterController.java:98)
    at org.eclipse.php.internal.debug.core.zend.debugger.handlers.ReadyNotificationHandler.handle(ReadyNotificationHandler.java:34)
    at org.eclipse.php.internal.debug.core.zend.communication.DebugConnectionThread$InputMessageHandler.run(DebugConnectionThread.java:881)
    at java.lang.Thread.run(Thread.java:636)

I'm trying to see if I can track down anything else given this.

A: 

Were any changes made to your firewall? I use NuSphere's php debugger, and it communicates via a TCP socket. If your firewall was modified during the update, your firewall could be preventing the debugger server from contacting your debugger client via the localhost port it (maybe) runs on. Not too sure how Eclipse's debugger works, but I would guess the same way.

For kicks, you can try running snort to see if the debugger is sending packets to you.

Zak
+1  A: 

One of the really nice things about eclipse is that it has no installer, although I see some well-intentioned traveller on a certain road has made it possible for you to do apt-get eclipse. (Hint: don't do that.)

One of the not-so-nice things is that it is rather complex. If you think you may have flipped one of the thousands of switches it has, just unpack the archive and do a parallel install. Eclipse is well-behaved that way, even on windows. If the parallel install works, then at least you know it's just your workspace or configuration, and if it doesn't, you know to look externally. (Err, unless you made the same mistake twice with your run config.)

DigitalRoss
+2  A: 

You mentioned that you couldn't figure out what was going on, but creating a new workspace seemed to solve the problem. The case is probably just a well-known issue with Eclipse. Basically, over time, cruft tends to build up in the system. As this happens, Eclipse (and particularly the plugins) start to break. You can solve this (without creating a new workspace) by using the -clean argument when starting Eclipse.

So, if you are running Windows, edit the shortcut pointing to Eclipse so that you see:

eclipse.exe -clean

That should help. Read more information about it here: Keeping Eclipse Running Clean

JasCav