Better Debugging for Office App – Using JavaScript Console in Visual Studio

By | April 28, 2014

In the previous post I discussed about, Using DOM Explorer to Inspect your Office App in Visual Studio . While DOM Explorer helps you on inspect elements, applying CSS on the fly and many more things, playing around with JavaScript code , debugging it again difficult when the App is hosted on any of the Office Client.  When the Office App is running, the only preferable way to debug the JavaScript code is using Visual Studio , by either holding the code using breakpoints or using breaking it through debugger.

To make it easier and debugging the code quickly, you can take advantages of JavaScript Console Window.

– Run your Office App from Visual Studio

– Open the “JavaScript Console” from Debug – Windows menu.

Open JavaScript Console .

– Once the JavaScript Console is launched, you can select the “Target”  page in the top right corner.

– Select the page for which you want to debug, then you can use the similar JavaScript console experience that we generally used for the Developer Toolbar.

Console Window During Debugging

What else,  together DOM Explorer Windows and JavaScript Console Windows provides a great debugging  experience for the Office App Developer.

Overall Debugging Experience