Debugging Outlook Add-in Desktop

自闭症网瘾萝莉.ら 提交于 2020-01-13 07:15:13

问题


I'm currently developing an Add-in using yeoman and generator-office for Outlook to save an email and its attachments to another service.

Outlook Version: MS Office Professional Plus 2016 v.16.0.48.49.1000

I am able to sideload the add-in by going to File->Manage Add-ins->(Outlook webapp extensions page opens)->Add from file->Select my manifest.xml.

Then I run npm run start and I get:

App type: desktop
Enabled debugging for add-in 17717569-bd61-4c6a-b99d-ca55924a2916. Debug method: 0
Starting the dev server... (webpack-dev-server --mode development)
The dev server is running on port 3000. Process id: 9660
Sideloading the Office Add-in...
Error: Unable to start debugging.
Error: Unable to sideload the Office Add-in.
Error: Sideload is not supported.

The add-in is sideloaded and I'm able to use it, but without being able to attach a debugger I'm blocked.

Any known solutions for this?

Edit: I followed the guide from https://docs.microsoft.com/en-us/outlook/add-ins/quick-start.

@MS Team If it is not possible to add a debugger using Yeoman, is it possible using the Visual Studio approach ?


回答1:


You can run the dev server (npm run dev-server) rather than use "npm start" because Outlook does not support sideloading. Once the dev server is running, you can load the add-in using the steps you mentioned. Once the add-in is running in Outlook, you can use the browser dev tools to debug it. If you are on Windows 10 Version 1903 or later, it should be using the Edge WebView, and you can use the Edge DevTools Preview from the Windows 10 Store to debug it. For previous version of Windows, where the Internet Explorer WebView is being used, the F12 dev tools are used to debug.



来源:https://stackoverflow.com/questions/58501403/debugging-outlook-add-in-desktop

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!