AFAIK vBulletin uses PHP's output controll feature.
All possible output get stored in a buffer, rather than directely sent to the browser.
That buffer can get modified before the final output, and vB likes doing that
I always add a "die;" or "exit;" after my echo or vardump debug.
A better (and way more clean way

) would be enabling vB's debug mode and use DEVDEBUG(); instead of echo to make up your debug messages....