Hi,
I found no better support topic for this.
I am using the Zend debugger with Eclipse to debug Drupal. If anyone is interested: see http://www.zend.com/pdt. You may want to use the all in one package for easier installation. Set .module, .install, .profile to be a PHP file under Window / Preferences / General / Content types. You create a PHP project, set up a new debug configuration for "PHP Web Page" and select index.php under "File / Project" when configuring the debug configuration. I prefer to use an external browser for debugging. You also have to edit your php.ini, you have to add e.g. the following line to it (in case of Windows):
zend_extension_ts=C:\Program Files\eclipse\plugins\org.zend.php.debug.debugger.win32.x86_0.1.7\resources\php5\ZendDebugger.dll
This line (without the absolute path) can be found in eclipse\plugins\org.zend.php.debug.debugger.win32.x86_0.1.7\resources\php5\php.ini.
Of course you have to restart Apache for this to take effect.
You are now ready to debug Drupal with a nice debugger. I hope this piece of information will be useful for many.
But of course with this you will only be able to debug code, which is accessible when index.php is run. I don't know however if this approach could be used to debug the functions with which Drupal serves xmlrpc calls (sorry for my English).
Any help would be highly appreciated!
Attila
Comments
Cool. Must try that.
Hey thanks!
I'll try that next time I need a headache again!
Seriously, I'm loving Eclipse, but had several bad attemts at getting the Zend (or PEAR, or some other package) debuggers working ever at all. I gave up.
Maybe you've found the right solution! Thanks for documenting it!
I can't help much with XML-RPC, sorry, although I'd probably start by installing Fiddler or Ethereal to really see what was happening.
Have you had any luck with Eclipse syntax formatter? I can't stop it crunching my array declarations.
.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/
.dan. is the New Zealand Drupal Developer working on Government Web Standards
add debug info to the xmlrpc url
i found this working with xdebug and eclipse:
start a debug session in firefox, copy the debug part to your xmlrpc-client script url like this:
$res = "http://host/services/xmlrpc?XDEBUG_SESSION_START=ECLIPSE_DBGP&KEY=123456...";
$c = new xmlrpc_client($res);
when you start your client script, eclipse will start the debugging.
tested with drupal 6 and eclipse pdt 2.1
Worked perfectly for me
I just used this technique to debug successfully.
Works well on Netbeans on Drupal 7 too.
Works well on Netbeans on Drupal 7 too with "?XDEBUG_SESSION_START=netbeans-xdebug"
Cameron Wong
http://www.eguidedog.net