Debugging PHP Scripts Using Eclipse

I have been using Eclipse 3.4.2 with PHPEclipse and Zend Debugger for some time without any problems. Suddenly, I cannot debug PHP scripts. I can run them in order, but when I select Debug as ... , the script appears in the debug window as if it was working, but it is not. If I press pause, he reports that he is on line 0. I can go through it, if I return, let him sit and then pause him again, he still reports that he is on line 0.

I tried to shut everything down, restart my system and create a new project with no luck.

I recently upgraded my Ubuntu system, but nothing was related to PHP or Eclipse (what could I say). XULRunner has been updated.

I checked the Debug settings, it has a Zend debugger and a PHP executable, selected the way they were before, when they worked. I played with Editing the original search to make sure it was looking in the right place.

Any ideas?

Edit: the eclipse debugger listens on port 10000, I can fine telnet localhost 10000. when I send some garbage characters, eclipse displays an error message about an incompatible debugger, so it seems to be listening

Edit: I couldn't figure out what was going on, but creating a new workspace seems 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. At 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 starting a debugging 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 figure out if I can track everything else, given this.

+3
3

, , , , , . , , Eclipse. , , . , Eclipse ( ) . ( ), -clean Eclipse.

, Windows, , Eclipse, :

eclipse.exe -clean

. : Eclipse Running Clean

+3

eclipse , , , - apt-get eclipse. (: .)

, . , , . Eclipse . , , , , , , . (Err, .)

+1

Have any changes been made to your firewall? I am using the NuSphere php debugger and it is communicating over a TCP socket. If your firewall was changed during the upgrade, your firewall may prevent the debugger server from contacting your debugger client through the localhost port on which it is (possibly) running. Not too sure how the Eclipse debugger works, but I would have guessed the same way.

For hits, you can try running snort to see if the debugger sends packets to you.

0
source

Source: https://habr.com/ru/post/1719328/


All Articles