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

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

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

Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at http://abhijitjana.net , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.