I don\'t think that this is doable, but wanted to throw it out to the community to confirm my suspicions.
Let\'s say you\'re writing a program in another language
Google has released their Closure toolset which includes a JavaScript compiler and minimizer. I haven't used it personally but have heard a lot of great things. Also, it apparently helps you locate browser compatibility issues.
I don't think it will help you to perform real-time analysis, but still could be a valuable tool.