Is there an interactive PHP testing tool for Drupal? I'm in the middle of trying to create some contextphp code and drupal_set_message debugging is getting old fast. Is there any tool that would allow me to specify a url "context" (e.g. /node/6) and then have a PHP editor that could dynamically execute the code in the window as if it was running in that context?
If you are running locally, you can install Netbeans and Xdebug and set break points, watches and everything. 

If you want just a little better then drupal_set_message() you can run devel and the output from dpm() will be formatted by Krumo. That's at least helpful.