i have managed to setup Eclipse PDT -xdebug-Wamp reading the various book posts under development. I have also installed the plug-in Drupal for eclipse.

I have set a breakpoint to index.php and another one inside user.pages.inc in function user_pass_validate but i cannot step into the function?

Can somebody tell how to set breakpoints in modules function and step into them?
Is it a matter of xdebug?
Should i use zend debugger instead?



scrypter’s picture

no one has answered this. I use xdebug in a different editor (tswebeditor) and it works fine. I have to add this to the url, ?XDEBUG_START_SESSION=tswebeditor. You might have some luck with ?XDEBUG_START_SESSION=eclipsepdt
php.ini settings can effect this also, here are the ones I have. I comment some in/out if I can't get it working.


;xdebug.auto_trace = On
xdebug.collect_params = 4
xdebug.collect_return = On
xdebug.collect_vars = On
xdebug.default_enable = On
;xdebug.remote_autostart = On
xdebug.dump_once = On
xdebug.dump_undefined = On
xdebug.trace_format = 0
xdebug.trace_output_dir = c:\wamp\tmp
xdebug.trace_output_name = trace.txt
;xdebug.extended_info = On

I have tried eclipse several times and given up in despair, too java-ish, huge .... I know it is well regarded and frequently recommended, but I have something that works for me that is way smalller and written in Delphi so windows only.

www.purpleoar.co.nz/scryptik - Javascript editor with syntax error checking
www.purpleoar.co.nz - Web development, Drupal consultancy

thedi’s picture

I had exactly the same problem. This document helped me to solve it http://www.eclipse.org/pdt/documents/XDebugGuideForPDT2.0.pdf. I use Eclipse for PHP Developers, Version: Helios Service Release 2
Build id: 20110301-1815, XAMPP, php_xdebug-2.1.0-5.3-vc6.dll. The only thing I had to change according the
documentation was using zend_extension instead of zend_extension_tx in php.ini. I configured it with
XDebug for Firefox add-on. All works fine now.
Good luck.

jstrauss64’s picture

I had the problem where I was able to stop at breakpoints in .php files and .inc files, but the debugger would not stop in the .module files.

I found this on the Eclipse forum: http://www.eclipse.org/forums/index.php/m/43630/?srch=debug+php+xdebug+d.... The post has a three point checklist. The one about making sure that "the drupal files were fully imported into my project" did the trick for me. I had to move the files out of the project, and then import them back. I don't know why this worked but I can now put break points inside my .module files and the debugger will stop there.

I hope this will help someone else. I've been searching the drupal.org site and the eclipse site for a solution.

Thanks to noah_ten.yahoo.com on the Eclipse forum!


gumdal’s picture

It worked for me in similar lines. I added few folders (modules) in file system and used "Refresh" menu (after right-click) on the root of the project. It did show me the newly added modules, but the breakpoint was never triggering. I deleted the whole project and newly added the PHP project after which the breakpoints were recognized! Surely some bug in Eclipse but this is what we have to live with!

Raj Pawan G