By choosing Break at First line, the debugger gets active when entering each file, allowing me to step in and out of the code. But it is a bit cumbersome having to tab your way through half a million steps to get to the point where it starts to get interesting.
My setup is WIMP Window 7, PHP 5.3
; xDebug config
zend_extension = "C:\Program Files (x86)\PHP\v5.3\ext\php_xdebug-2.2.1-5.3-vc9-nts.dll"
xdebug.remote_autostart=0;
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
I have made sure that the path mapping is correct. But could it be because i'm linking to the PHP files from my Eclipse project?
Eclipse has an option to turn off "break at first line". Go to "Windows -> Preferences -> PHP -> Debug" and uncheck "Break at first line" and also to go in "Run > Debug Configurations > PHP Web Application" and unselect "Break at first line" in all the configurations. Then restart Eclipse.
Here is a post describing how to get breakpoints to work with XDebug in Eclipse.
http://programmersjunk.blogspot.com/2013/05/eclipse-and-xdebug.html
For all those, that are still fighting with this problem, some handy tips.
Check which version (package) of Eclipse you have? It turns out, that Helios package has some bugs and doesn't stops on breakpoints, when you debug your application as
Web Application
. Debugging works only, if you run it asPHP Script
. Which makes it pretty useless for debugging process.You should consider either reverting to older Galileo Package Eclipse for PHP Developers or installing newest Eclipse Juno (or even newest developer version of Eclipse Kepler), which doesn't have PDT support build in, but you can easily add it to then, using
Help > Install New Software..
(point it tohttp://download.eclipse.org/tools/pdt/updates/release
).These versions are reported to be able to debug as
Web Application
, respecting breakpoints.Also, remember, that Xdebug must be run as Zend Extension in order to support breakpoints! In other words remove
extension=xdebug.so
(on Linux orxdebug.dll
on Windows) line from yourphp.ini
and replace it withzend_extension=/full/path/to/xdebug.so
(on Linux orzend_extension=X:\full\path\to\xdebug.dll
on Windows). Zend extensions requires full path, even if they're put into/php/ext
folder, as regular PHP extensions. You'll find more info on this in Xdebug FAQ (look for an answer to "Xdebug is only loaded as PHP extension and not as a Zend Extension" question).After downloading Eclipse Juno i'm able to stop at breakpoints.
I have tried everything with Eclipse Indigo. Version: 3.7.2 Build id: M20120208-0800
Just wont work, either with an internal or external browser.
Time to move on to Juno i guess?