Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to debug office.js add-ins on Windows using Visual Studio Code without admin privilege

I created a Word Add-in using Yeoman generator and try to set up my development environment with VSC on Windows 10. When I start command

npm start or

npx office-addin-debugging start ./manifest.xml,

I got the following message

Debugging is being started...
App type: desktop
? Allow localhost loopback for Microsoft Edge WebView? Yes
Error: Unable to start debugging.
Error: Access Denied, run the command as an administrator  

My company has a very tight controls over our PC. Is there any workaround to debug the office.js add-in without the admin privilege (e.g. let my IT admin to set some flags in windows registry)?

Thanks, -ZJ

I tried to switch to Visual Studio 2022. However, I prefer the Yeoman TypeScript project to C# web application.

like image 759
zjda Avatar asked Oct 31 '25 18:10

zjda


1 Answers

I had the same problem with Excel add-in and Windows 11:

The simple workaround I did at first, was to answer no ("n") when I was asked for "Allow localhost loopback ... WebView?".

What really solved it was to run the "npm start" command using PowerShell as administrator once. Since then, it works from VS Code terminal (without special privileges).

So, try to run the command once, using PowerShell with the help of your system administrator and then see if it fixes the problem forever.

like image 136
Dim Vai Avatar answered Nov 03 '25 23:11

Dim Vai