{"id":5021,"date":"2019-03-29T12:28:07","date_gmt":"2019-03-29T17:28:07","guid":{"rendered":"http:\/\/lisa.rushworth.us\/?p=5021"},"modified":"2019-03-28T19:23:27","modified_gmt":"2019-03-29T00:23:27","slug":"teams-debugging","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=5021","title":{"rendered":"Teams Debugging"},"content":{"rendered":"<p>The Teams desktop client is an <a href=\"https:\/\/github.com\/electron\/electron\">Electron<\/a> application \u2013 which means you can debug the Teams client just like any <em>other<\/em> Electron application. To set up debugging through Chrome, open Chrome to chrome:\/\/inspect Configure network targets. Click \u201cConfigure\u201d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"517\" class=\"wp-image-5022\" src=\"http:\/\/lisa.rushworth.us\/wp-content\/uploads\/2019\/03\/word-image-115.png\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/03\/word-image-115.png 1920w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/03\/word-image-115-300x81.png 300w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/03\/word-image-115-768x207.png 768w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/03\/word-image-115-1024x276.png 1024w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<p>Add an unused port to be used for Teams debugging.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"378\" height=\"416\" class=\"wp-image-5023\" src=\"http:\/\/lisa.rushworth.us\/wp-content\/uploads\/2019\/03\/word-image-117.png\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/03\/word-image-117.png 378w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/03\/word-image-117-273x300.png 273w\" sizes=\"auto, (max-width: 378px) 100vw, 378px\" \/><\/p>\n<p>Run Teams with the remote debugging flag port set to the same port you added above. E.g.<\/p>\n<p>%userprofile%\\AppData\\Local\\Microsoft\\Teams\\current\\Teams.exe &#8211;remote-debugging-port=51555<\/p>\n<p>Now you\u2019ve got access to the Electron app in Chrome. Click on \u201cInspect\u201d for the thread you want to watch<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1496\" height=\"473\" class=\"wp-image-5024\" src=\"http:\/\/lisa.rushworth.us\/wp-content\/uploads\/2019\/03\/word-image-118.png\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/03\/word-image-118.png 1496w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/03\/word-image-118-300x95.png 300w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/03\/word-image-118-768x243.png 768w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/03\/word-image-118-1024x324.png 1024w\" sizes=\"auto, (max-width: 1496px) 100vw, 1496px\" \/><\/p>\n<p>You can add break-points in the code to pause program execution.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1919\" height=\"1025\" class=\"wp-image-5025\" src=\"http:\/\/lisa.rushworth.us\/wp-content\/uploads\/2019\/03\/word-image-119.png\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/03\/word-image-119.png 1919w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/03\/word-image-119-300x160.png 300w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/03\/word-image-119-768x410.png 768w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/03\/word-image-119-1024x547.png 1024w\" sizes=\"auto, (max-width: 1919px) 100vw, 1919px\" \/><\/p>\n<p>You\u2019ll see a \u201cPaused in debugger\u201d indicator when a breakpoint is reached. You can resume or step over using this indicator, or you can use the DevTools debugger \u2013 the DevTools debugger also allows you to proceed one step at a time through program execution (F9).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1915\" height=\"1031\" class=\"wp-image-5026\" src=\"http:\/\/lisa.rushworth.us\/wp-content\/uploads\/2019\/03\/word-image-132.png\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/03\/word-image-132.png 1915w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/03\/word-image-132-300x162.png 300w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/03\/word-image-132-768x413.png 768w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/03\/word-image-132-1024x551.png 1024w\" sizes=\"auto, (max-width: 1915px) 100vw, 1915px\" \/><\/p>\n<p>Through the debugger, I was able to identify the source of the weak little notification ding<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1499\" height=\"423\" class=\"wp-image-5027\" src=\"http:\/\/lisa.rushworth.us\/wp-content\/uploads\/2019\/03\/word-image-133.png\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/03\/word-image-133.png 1499w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/03\/word-image-133-300x85.png 300w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/03\/word-image-133-768x217.png 768w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/03\/word-image-133-1024x289.png 1024w\" sizes=\"auto, (max-width: 1499px) 100vw, 1499px\" \/><\/p>\n<p><a href=\"https:\/\/statics.teams.microsoft.com\/hashedassets\/audio\/Teams_Notification_Secondary-a8621153.mp3\">https:\/\/statics.teams.microsoft.com\/hashedassets\/audio\/Teams_Notification_Secondary-a8621153.mp3<\/a><\/p>\n<p>Which means I can redirect <em>this<\/em> URL \u2026 really anything that matches the URL up through Teams_Notification because I expect the alpha-numeric at the end to change and I\u2019m sure there\u2019s a primary notification \ud83d\ude0a \u2026 and make the notification <em>noticeable<\/em>.<\/p>\n<p>Looking through the package, I see eighteen different \u2018ringtone\u2019 type MP3 files, and only three lines of code that use them. Hopefully this is an indicator that MS has begun development of some user-selectable notification sounds in the desktop client.<\/p>\n<p>nonMeetupRingAudio = new Audio(data.assetsPath + &#8216;audio\/ring.mp3&#8217;);<\/p>\n<p>meetupRingAudio = new Audio(data.assetsPath + &#8216;audio\/meetup_ring.mp3&#8217;);<\/p>\n<p>screenshareRingAudio = new Audio(data.assetsPath + &#8216;audio\/screenshare_ring.mp3&#8217;);<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Teams desktop client is an Electron application \u2013 which means you can debug the Teams client just like any other Electron application. To set up debugging through Chrome, open Chrome to chrome:\/\/inspect Configure network targets. Click \u201cConfigure\u201d Add an unused port to be used for Teams debugging. Run Teams with the remote debugging flag &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[677],"tags":[771,691,729,666,686,772],"class_list":["post-5021","post","type-post","status-publish","format-standard","hentry","category-office-365","tag-debugging","tag-microsoft-office","tag-microsoft-office-365","tag-microsoft-teams","tag-ms-teams","tag-troubleshooting"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/5021","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5021"}],"version-history":[{"count":1,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/5021\/revisions"}],"predecessor-version":[{"id":5028,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/5021\/revisions\/5028"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}