Yeah, vBulletin uses output buffering in many places (hooks mostly). If you use any (echo, print_r, var_dump, etc) in the actual script, it should almost always work...
devDebug() puts it into the debug dropdown menu in the bottom of the page (this of course requires debug mode to be enabled). This would not be ideal for larger pieces of text... What I use is a bunch of functions that I include (in a functions_debug.php file or something similar). Here is one:
PHP Code:
function ajDump($var, $exit = false)
{
echo '<pre>';
var_dump($var);
echo '</pre>';
if ($exit)
{
exit;
}
}