Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is 'no breakpoints stop` finally solved in Eclipse PDT + Xdebug?

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?

like image 563
trejder Avatar asked May 15 '13 13:05

trejder


People also ask

How do I enable breakpoints in eclipse?

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.

What to do if debugger is not working in Eclipse?

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.


1 Answers

Have you tried using PHPEclipse? It seems to work fine when debugging php code with Xdebug.

like image 189
mech Avatar answered Sep 19 '22 19:09

mech