I'd like to know if there is any way to output the document's source before any of it is rendered. This would mean retaining all tags, markup, and code: PHP, HTML, EE tags, scripts, etc to see the entire doc. All this set is accessible via debug but it's horrendously garbled and hard to shift through.
I'm not following your question 100% but take a look at the EE Debug Toolbar. It's the newest addon for debugging EE templates and may give you more of what you're wanting.
Adds an unobtrusive interface for debugging output on an ExpressionEngine 2.0 site. Replaces default Profiler and Template Debugger provided with ExpressionEngine.