Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Breakpoint Step Into Banging my head against wall
icon11.gif  Breakpoint Step Into Banging my head against wall [message #1385486] Fri, 06 June 2014 20:50 Go to next message
Edward P is currently offline Edward PFriend
Messages: 3
Registered: June 2014
Junior Member
Hello eclipsers,

For days I have search for a solution to get debugging for PHP to work fully (with breakpoints; Step Into, etc.) I have had zero success.

I have tried so many things I got from websites and I have run out of research and ideas to try.

Could someone take the time to help me get it working. Without a solidly functioning debugger, my installation of eclipse, essentially, becomes a glorified text editor.

Please help...

Thanks,
Edward
Re: Breakpoint Step Into Banging my head against wall [message #1393180 is a reply to message #1385486] Thu, 03 July 2014 11:22 Go to previous messageGo to next message
Žilvinas Žaltiena is currently offline Žilvinas ŽaltienaFriend
Messages: 4
Registered: July 2014
Junior Member
You need:
1) Webserver running PHP with XDebug extension enabled.
2) Firefox with addon bar visible and "easy XDebug" extension installed.

Unfortunately newer Firefox version have removed addon bar. "The Addon Bar (Restored)" extension is one of the ways to fix that.

I am running XAMPP on localhost for development. My settings as follows.

php,ini:
[XDebug]
zend_extension = "E:\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = "E:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.trace_output_dir = "E:\xampp\tmp"
xdebug.max_nesting_level=1000


Eclipse:
1)Window>Preferences>PHP>Debug>Installed debuggers>XDebug: default port=9000, Accept remote session = localhost.
2)Window>Preferences>PHP>Debug: Break on first line = no
2)Window>Preferences>PHP>PHP Executables/Servers: debugger type set to XDebug.

Usage:
1) create breakpoints in Eclipse
2) open Firefox, click green square and addon bar - this will signal webserver to laucnh XDebugged session on request
3) navigate to page you breakpointed earlier
4) page loading will hang and your Eclipse will switch to debugging mode.

I am working this way for years. It is very comfortable, because I can turn off XDebug for some pages (like login), and turn on just before requesting the one I like to debug.
Re: Breakpoint Step Into Banging my head against wall [message #1393310 is a reply to message #1393180] Thu, 03 July 2014 15:40 Go to previous messageGo to next message
Edward P is currently offline Edward PFriend
Messages: 3
Registered: June 2014
Junior Member
Žilvinas,

Thank you for such a thoughtful reply.

Unfortunately, that had no effect. Since I posted my original problem, I since have tried ZendDebugger.dll and it works just fine. Knowing that ZendDebugger.dll works like a champ, I have tried many times, since, to get XDebug to work. It never does, in fact Eclipse, firefox, and everything seems to behave as if the XDebug dll is not even there. Except I know it is because the XDebug message display in the browser.

I have checked and the XDebug dll is loaded with PHP, but looks like it just is not being used or seen by Eclipse.

I am beginning the think maybe that the either the latest version of XDebug (2.2.5) has a bug that prevents it from working with my version of Kepler OR my version of Kepler has a bug that prevents it from working with XDebug. I conclude this simply due to the fact that ZendDebugger.dll works just fine. Also, I pondered perhaps XDebug is a "dead" tool and is not really being maintained for current releases of Eclipse, PHP, or who knows.

Thank goodness for ZendDebugger.dll!

If anyone has viable insight on why ZendDebugger.dll works great and XDebug seems to behaving like it is invisible to Eclipse (Kepler 20140224-0627), please let us know.

Btw, we will not be update Kepler in the middle of an active mission critical project development. We will remain on Kepler 20140224-0627 until final delivery. If noone has any ideas, the perhaps after the project is completed, we will update Eclipse to see if we can determine where the bug (if any) lies, XDebug or our version of Kepler.

Sincerely,
Edward
Re: Breakpoint Step Into Banging my head against wall [message #1393336 is a reply to message #1385486] Thu, 03 July 2014 16:30 Go to previous messageGo to next message
Žilvinas Žaltiena is currently offline Žilvinas ŽaltienaFriend
Messages: 4
Registered: July 2014
Junior Member
Quick ideas:
1) double check if you load XDebug with zend_extension= and not with extension=. Former is needed for what you want to use Xdebug for. Later will give you browser output, but no breakpoints and etc.
2) Eclipse doesn't see XDebug, because it is not even looking for it. Eclipse as debug client is listening on specified port (i.e.9000) for incoming connections and XDebug is supposed to look for Eclipse and connect to it. In some cases this port isn't available due to firewall or some other process using it:
a) check firewall,
b) check netstat for what is listening on what
c) try using different port (Window>Preferences>PHP>Debug>Installed debuggers>XDebug + xdebug.xdebug.remote_port in php.ini).
d) make sure security software (antivirus, selinux, apparmor and so on) does not block connection.

Re: Breakpoint Step Into Banging my head against wall [message #1393357 is a reply to message #1393336] Thu, 03 July 2014 17:18 Go to previous messageGo to next message
Edward P is currently offline Edward PFriend
Messages: 3
Registered: June 2014
Junior Member
Žilvinas Žaltiena wrote on Thu, 03 July 2014 12:30
Quick ideas:
1) double check if you load XDebug with zend_extension= and not with extension=. Former is needed for what you want to use Xdebug for. Later will give you browser output, but no breakpoints and etc.
confirmed XDebug is in php.ini with zend_extension=...also confirmed that when used with the extension= I do receive the expected browser output

2) Eclipse doesn't see XDebug, because it is not even looking for it. Eclipse as debug client is listening on specified port (i.e.9000) for incoming connections and XDebug is supposed to look for Eclipse and connect to it. In some cases this port isn't available due to firewall or some other process using it:

in Window>Preferences>PHP>Debug>Installed debuggers> Zend Debugger is assigned port 10000 and XDebug is assigned port 9000...also in php.ini file is the following line: xdebug.remote_port=9000

a) check firewall, everything is running on localhost, but Windows Firewall is turned off
b) check netstat for what is listening on what netstat -a shows listening on port 10000 and 9000
c) try using different port (Window>Preferences>PHP>Debug>Installed debuggers>XDebug + xdebug.xdebug.remote_port in php.ini). set port in both Eclipse and php.ini to 9011, same result
d) make sure security software (antivirus, selinux, apparmor and so on) does not block connection. avast turned off/disabled



Again, Perhaps XDebug is broken for my version of Kepler?
ZendDebugger consistantly works and XDebug consistently seems to be ignoring Eclipse requests.

Can imagine what might be the problem...
Edward
Re: Breakpoint Step Into Banging my head against wall [message #1479840 is a reply to message #1385486] Wed, 19 November 2014 19:39 Go to previous message
Spencer Williams is currently offline Spencer WilliamsFriend
Messages: 5
Registered: November 2014
Junior Member
This is absolutely ridiculous. I reluctantly admit that it would appear the only solution is to use older PHP and Zend Debugger because it works and Xdebug seems to think their system not working is Eclipse's fault. Maybe it just doesn't work with virtual host setups?
Previous Topic:What does "Build Project" command do?
Next Topic:Need .php file for pecl extensions & Code Assist
Goto Forum:
  


Current Time: Thu Apr 25 17:01:04 GMT 2024

Powered by FUDForum. Page generated in 0.02929 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top