- Node.js version 8 or higher.
- VS Code - latest version recommended.
-
Trust the SSL certificates for
https://localhost
. More info -
On Mac, enable debugging for the webview using Safari Web Inspector.
In a Terminal window, run these commands:
defaults write com.microsoft.Word OfficeWebAddinDeveloperExtras -bool true defaults write com.microsoft.Excel OfficeWebAddinDeveloperExtras -bool true defaults write com.microsoft.Powerpoint OfficeWebAddinDeveloperExtras -bool true defaults write com.microsoft.Outlook OfficeWebAddinDeveloperExtras -bool true
-
Open the folder in VS Code.
-
Run the
Dev Server
task usingTerminal
,Run Task
.The first time, open a browser to https://localhost:3000 to verify that the SSL certificates are trusted.
- Switch to the Debug view using
View
,Debug
or press Ctrl+Shift+D. - Choose the desired debug configuration:
Office Online (Edge)
Office Online (Chrome)
- Start debugging by pressing F5 or the green play icon.
- When prompted, paste the url for an Office document. You can obtain this by copying the link when sharing a document.
- Use
Insert
,Add-ins
to upload the manifest file. More info
- NOTE: You can also use the browser dev tools to debug.
- Switch to the Debug view.
- Choose the desired debug configuration from the list:
Excel Desktop
PowerPoint Desktop
Word Desktop
- Choose
Start Without Debugging
from theDebug
menu. NOTE: The integrated VSCode debugger cannot debug the Office Add-in running in the task pane. - To debug, you need to use another debugger:
Edge DevTools
(Windows 10)F12 DevTools
(Windows)Visual Studio
(Windows)Safari Inspector
(Mac)
- To build for production, use
npm run build
.
- Use
npm run dev-server
to run the dev-server.
- To start debugging, use
npm start desktop -- --app {app}
where{app}
isexcel
,powerpoint
, orword
. - If the dev-server is not already running, it will run the dev-server in a separate window.
- The add-in will be configured for debugging, and a document will be opened which loads the add-in.
- Once you're done debugging, use
npm stop desktop -- --app {app}
so the add-in is no longer configured for debugging.
- To start debugging, use
npm start web
. - If the dev-server is not already running, it will run the dev-server in a separate window.
- Open the desired Office document in the browser.
- Use
Insert
,Add-ins
to upload the manifest file. More info - Use the browser dev tools to debug.