{"id":1133,"date":"2015-11-11T10:34:40","date_gmt":"2015-11-11T17:34:40","guid":{"rendered":"https:\/\/toddbaginski.com\/blog\/?p=1133"},"modified":"2015-11-11T10:34:40","modified_gmt":"2015-11-11T17:34:40","slug":"how-to-debug-office-add-in-in-office-clients-without-visual-studio","status":"publish","type":"post","link":"https:\/\/toddbaginski.com\/blog\/how-to-debug-office-add-in-in-office-clients-without-visual-studio\/","title":{"rendered":"HOW TO: Debug Office Add-in In Office Clients Without Visual Studio"},"content":{"rendered":"<p>If you have ever developed an Office Add-in with Visual Studio you are familiar with pressing F5 to run your Office Add-in and debug the code in it. \u00a0When you take this approach Visual Studio opens the Office client program associated with your Office Add-in and automatically loads your Add-in into the Office client program. \u00a0Then, all you do is set breakpoints in your code and debug your code. \u00a0Easy peasy, as my son would say.<\/p>\n<p>But what about if you don&#8217;t have Visual Studio installed? \u00a0How can you debug the Office Add-in?<\/p>\n<p>You first option is to load the Office Add-in in an Office web client and use F12 to debug it from Internet Explorer, or to use the debugger that comes with other web browsers. \u00a0This works, but it does have a couple of\u00a0downsides, such as:<\/p>\n<p>&#8211; You might need to debug the Office client application on the PC because you are targeting specific versions of Office clients on the PC.<br \/>\n&#8211; You might observe the Office Add-in behaving differently in an Office client application versus an Office web client.<\/p>\n<p>The other option is one I learned from\u00a0<a href=\"https:\/\/channel9.msdn.com\/Events\/Speakers\/rolando-jimenez-salgado\" target=\"_blank\">Rolando Jimenez Salgado<\/a> at the Microsoft MVP Summit last week. \u00a0I just tried this option out and it works AWESOME. \u00a0So awesome that I thought I should quickly write up how to do it and share it with all the Office developers on our wonderful planet.<\/p>\n<p>1. First, fire up an Office client application on your PC. \u00a0In this example I am using Excel.<\/p>\n<p>2. Next, on the Insert tab in the Ribbon, click the Add-ins button and load an Add-in from the Store or your Add-in Catalog.<\/p>\n<p><a href=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/addin-button.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1134\" src=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/addin-button.jpg\" alt=\"Office Add-in Button\" width=\"459\" height=\"336\" srcset=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/addin-button.jpg 459w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/addin-button-300x219.jpg 300w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/addin-button-199x146.jpg 199w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/addin-button-50x36.jpg 50w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/addin-button-95x70.jpg 95w\" sizes=\"auto, (max-width:767px) 459px, 459px\" \/><\/a><\/p>\n<p>3. In this example I clicked the Store button and the first Add-in I saw in the list was one written by Rolando himself, so I loaded it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1135 size-full\" src=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/bubblesaddin.jpg\" alt=\"\" width=\"871\" height=\"550\" srcset=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/bubblesaddin.jpg 871w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/bubblesaddin-300x189.jpg 300w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/bubblesaddin-231x146.jpg 231w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/bubblesaddin-50x31.jpg 50w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/bubblesaddin-110x70.jpg 110w\" sizes=\"auto, (max-width:767px) 480px, (max-width:871px) 100vw, 871px\" \/><\/p>\n<p>4. Next, open the F12Chooser application that comes with Windows. \u00a0There are two versions of this application. \u00a0Use the version of the F12Chooser that matches the version of the Office client application you are running.<\/p>\n<p>32-Bit &#8211;\u00a0<strong>C:\\Windows\\System32\\F12\\F12Chooser.exe<\/strong><br \/>\n64-Bit &#8211;\u00a0<strong>C:\\Windows\\SysWOW64\\F12\\F12Chooser.exe<\/strong><\/p>\n<p>5. In this example, I am running the 32-Bit version of Office 2013 Professional Plus, so I ran\u00a0<strong>C:\\Windows\\System32\\F12\\F12Chooser.exe.<\/strong><\/p>\n<p>6. After you open the F12 Chooser program, select the application that you would like to debug. \u00a0In this example, I chose the bubbles.azurewebsites.net web site where the Bubbles Office Add-in (that Rolando wrote) runs. \u00a0If you are writing your own Office Add-in then select the web site that correlates to where you have the Add-in deployed. \u00a0This could be a localhost URL.<\/p>\n<p><a href=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/F12-Chooser.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1136\" src=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/F12-Chooser.jpg\" alt=\"F12 Chooser\" width=\"779\" height=\"550\" srcset=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/F12-Chooser.jpg 779w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/F12-Chooser-300x211.jpg 300w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/F12-Chooser-206x146.jpg 206w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/F12-Chooser-50x35.jpg 50w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/F12-Chooser-99x70.jpg 99w\" sizes=\"auto, (max-width:767px) 480px, (max-width:779px) 100vw, 779px\" \/><\/a><\/p>\n<p>7. As soon as you click the target to debug, the F12 debugger loads. \u00a0Here you can see the F12 Debugging application loaded and attached to the Bubbles Office Add-in.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1137 size-full\" src=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/F12-Debugger-1.jpg\" alt=\"F12 Debugger 1\" width=\"974\" height=\"1107\" srcset=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/F12-Debugger-1.jpg 974w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/F12-Debugger-1-263x300.jpg 263w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/F12-Debugger-1-900x1024.jpg 900w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/F12-Debugger-1-128x146.jpg 128w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/F12-Debugger-1-43x50.jpg 43w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/F12-Debugger-1-61x70.jpg 61w\" sizes=\"auto, (max-width:767px) 480px, (max-width:974px) 100vw, 974px\" \/><\/p>\n<p>8. To test it out, I created a Data Table in my Excel document, then set a breakpoint in the ExcelBubbles.js file that is part of\u00a0the Bubbles Add-in. \u00a0Then I clicked the bubble that says Select Table and the breakpoint I set in ExcelBubbles.js was hit.<\/p>\n<p><a href=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/Bubbles-Add-in.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1138\" src=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/Bubbles-Add-in.jpg\" alt=\"Bubbles Add-in\" width=\"955\" height=\"976\" srcset=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/Bubbles-Add-in.jpg 955w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/Bubbles-Add-in-293x300.jpg 293w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/Bubbles-Add-in-142x146.jpg 142w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/Bubbles-Add-in-48x50.jpg 48w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/Bubbles-Add-in-68x70.jpg 68w\" sizes=\"auto, (max-width:767px) 480px, (max-width:955px) 100vw, 955px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/F12-Debugger-2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1139\" src=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/F12-Debugger-2.jpg\" alt=\"F12 Debugger 2\" width=\"974\" height=\"596\" srcset=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/F12-Debugger-2.jpg 974w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/F12-Debugger-2-300x183.jpg 300w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/F12-Debugger-2-238x146.jpg 238w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/F12-Debugger-2-50x30.jpg 50w, https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2015\/11\/F12-Debugger-2-114x70.jpg 114w\" sizes=\"auto, (max-width:767px) 480px, (max-width:974px) 100vw, 974px\" \/><\/a><\/p>\n<p>Perfect!<\/p>\n<p>Thanks, Rolando!<\/p>\n<p>Here is a link where you can learn more about the F12Chooser app. \u00a0<a title=\"http:\/\/blogs.msdn.com\/b\/prakashpatel\/archive\/2015\/11\/05\/vs2015-remote-debugging-javascript-part-3-f12chooser.aspx\" href=\"http:\/\/blogs.msdn.com\/b\/prakashpatel\/archive\/2015\/11\/05\/vs2015-remote-debugging-javascript-part-3-f12chooser.aspx\" target=\"_blank\">http:\/\/blogs.msdn.com\/b\/prakashpatel\/archive\/2015\/11\/05\/vs2015-remote-debugging-javascript-part-3-f12chooser.aspx<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you have ever developed an Office Add-in with Visual Studio you are familiar with pressing F5 to run your Office Add-in and debug the code<span class=\"excerpt-hellip\"> [\u2026]<\/span><\/p>\n","protected":false},"author":1,"featured_media":1140,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[88,104],"tags":[10,6,45,105,95,7,43],"class_list":["post-1133","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office","category-office-365","tag-custom-development","tag-how-to-sharepoint","tag-o365","tag-office","tag-office-add-ins","tag-sharepoint","tag-sharepoint-online"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/posts\/1133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/comments?post=1133"}],"version-history":[{"count":6,"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/posts\/1133\/revisions"}],"predecessor-version":[{"id":1146,"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/posts\/1133\/revisions\/1146"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/media\/1140"}],"wp:attachment":[{"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/media?parent=1133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/categories?post=1133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/tags?post=1133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}