I got to playing a bit this evening with the debugger.
Found something interesting (at least, to me) regarding debugging CLI -aka- drush scripts.
Add this line to ~/.profile
XDEBUG_CONFIG="idekey=netbeans-xdebug"
Write your script like any other code.
set your breakpoint the same as for browser.
hit the "Debug Project" buttom (same as for browser).
It will launch the browser if it isn't running... but that is irrelevant.
now, go to your command line and type something like.
# drush scr -u 1 test.php
if 'test.php' is the name of your php script, you are in debug mode.
Great way to look at any of the objects, since drush fully bootstraps Drupal.
I've been having a good time just tinkering with it.
The ONLY thing I think you need to add for the next release, is the 'XDEBUG_CONFIG' variable in .profile.
Everything else is just procedural.
I found a YouTube video with all the right clues here: http://ruilima.com/2011/03/php-cli-xdebug-with-netbeans/
Comments
Comment #1
mike stewart CreditAttribution: mike stewart commentedComment #2
mike stewart CreditAttribution: mike stewart commented