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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With