Office add-ins running in the Windows Desktop version of Office products are hosted using an embedded web browser control within the Office product. Traditionally this browser control was based on Internet Explorer (IE). This has changed recently so that later builds of Office are using Edge as the browser control. The technique used to debug add-ins running on the embedded Edge browser is different to the traditional IE browser.
Download and install the Microsoft Edge DevTools from the Windows Store
Start the Office application and load the add-in (here I’ve started the OneNote Add-in)
Start the Microsoft Edge DevTools application, you should see a list of Edge windows currently open (under Debug Targets), including the add-in.
Simply click on the entry under Debug Targets to open an inspector window and start your debugging.