jsJetGuy
jsJetGuy

Reputation: 21

Microsoft Office Add-in Debugger Extension for Visual Studio Code not working

I am starting to learn writing Office Addins with Javascript. I have spent alot time on MS website going through tutorials and documentation. I figure I would try my hand on a few of the Addin walk throughs.

I am using VS Code with Node.js. After having successfully creating a few examples and worked through the creation process.

I figure I would step up the debug environment so I could really get into the learning/development phase. I followed the instructions on the following MS webpage https://learn.microsoft.com/en-us/office/dev/add-ins/testing/debug-with-vs-extension using my functioning addin example.

When I start the debugger inside VS Code, I get the following error:

Discovering targets via http://127.0.0.1:9222/json/list HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:9222

I am assuming I have a configuration problem somewhere, I have search for these errors but haven't found anyone out there that has experienced this problem.

Any suggests would be greatly appreciated.

Upvotes: 2

Views: 1657

Answers (1)

Maarten van Stam
Maarten van Stam

Reputation: 1899

I got a few comments on my demo video where I show how to do this with the exact same error.

You can find the video instruction and the comments on the fail here: How to: Debug OfficeJs Add-ins using Office Debug Extension in Visual Studio Code

So I went back and tested it again to in fact run into the same issue: Live Stream researching this exact issue

The way I was able to solve it was by changing back my Default Browser (Chrome) to Edge 'Legacy' (NOT the Chromium version using a different WebView). Running the process again got it to work. After that I was able to change back Chrome as default browser and it was still working.

It is (as you can see in the research video) important to see that your TaskManager shows the WWAHost entry in the details. If that is not there you are most likely running the incorrect WebView.

WebView2, the version used by Edge Chromium, is (not yet) supported but will be here soon.

Upvotes: 1

Related Questions