What is the current state of debugging PHP applications with Eclipse PDT and Xdebug. Has anyone got it finally to work, i.e. to stop at breakpoints defined in Eclipse (not using xdebug_break()
)?
I've read this over two years old question, but it turned out that even now (May 2013) Helios doesn't stops at breakpoints at all. So, I followed advice and switched to Galileo, only to find out, that it is also not stopping at breakpoints. The only difference I see is that Galileo also ignores Open in Browser
setting and always debugs in external webbrowser, which is itself very annoing.
When I have Break at First Line
checked, I see Eclipse taskbar icon to blink each time I click any link, but Eclipse clearly doesn't stops on anything -- neither first line nor breakpoints. It executes (renders entire page in external browser, as there would be no debugging at all.
If I uncheck Break at First Line
, Eclipse even doesn't react on my clicking in page being debugged. It goes through entire code and stops nowhere.
I'm able to stop by using xdebug_break()
, but this is of course a joke. If this is the only option, then I don't need Eclipse and Xdebug at all. I can use notepad and die()
to have the same results.
I've read somewhere, that even Galileo doesn't stop on breakpoint and I should install Juno instead. Is there any Eclipse version or package that can be used for debugging PHP apps with Xdebugs and that is able to stop on breakpoints? This has started to become crazy? How many versions should I test?
I've spent (too) many hours on this, reading many different StackOverflow answers, installing three different Eclipse editions, checking and unchecking hundreds of options and restarting Eclipse about million times and ended up with nothing. Would really appreciate any help on this.
Currently working on: Windows 7, Eclipse PDT Galileo SR 2, PHP 5.3, XAMPP.
If there is anyone out there, who was successfully in using Eclipse PDT and Xdebug for debugging PHP application with stopping on breakpoints and with respecting Open in Browser
option, can you please provide a simple answer on what to install, configure and check to achieve the same?
Breakpoints To define a breakpoint in your source code, right-click in the left margin in the Java editor and select Toggle Breakpoint. Alternatively, you can double-click on this position. The Breakpoints view allows you to delete and deactivate Breakpoints and modify their properties.
The solution was to enable it again, start a debug session, the breakpoint is hit and shown in the UI, then disable again the option. There is also another simpler way that will make Eclipse show the debugging highlight at the breakpoint or rather refresh the debugging UI to work as it should.
Have you tried using PHPEclipse? It seems to work fine when debugging php code with Xdebug.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With