The `office-addin-node-debugger` package facilitates web debugging for Office Add-ins by providing a Node.js instance to act as a proxy for the JavaScript runtime hosted by an Office application. It is a foundational component within the `Office-Addin-Scripts` monorepo, a collection of tools and utilities developed by OfficeDev for Office Add-in projects. While primarily intended as an underlying service, its programmatic interfaces can be imported into Node scripts for custom debugging workflows. The package ships with TypeScript types, promoting robust development. The current stable version is 1.0.6, last published about three months ago, suggesting a maintenance-oriented release cadence as part of a larger toolkit. This package differentiates itself by offering a Node.js-based proxy specific to the Office Add-in ecosystem, enabling integration with VS Code for a streamlined debugging experience, particularly against Edge runtimes.
npm install office-addin-node-debuggerVerified import paths — ran on the pinned version, not inferred.
This TypeScript example demonstrates how to programmatically start and stop the Office Add-in Node Debugger proxy. It showcases typical configuration options like manifest path, development server port, and debugger port, providing a basic framework for integrating it into a custom build or test script.
Consult the latest official Microsoft Office Add-ins documentation for specific debugging setup for your Office version, host application, and operating system. Be prepared to use workarounds or alternative debugging methods, such as `olk.exe --devtools` for New Outlook.
Regularly clear the Office cache, especially after making changes to your add-in manifest or experiencing unexpected behavior. Instructions vary by operating system; typically, this involves specific folders or command-line tools.
Ensure you are running a supported Node.js version (e.g., Node.js 10+ is a common prerequisite for related Office Add-in debugging tools). Update Node.js to the latest LTS version if encountering unexpected errors.
Run your command prompt, terminal, or VS Code instance as an administrator when starting debugging sessions or executing Office Add-in related commands to avoid permission-related errors.
Configure your development server and debugger to use distinct, available ports. Check for other processes occupying the intended ports using tools like `netstat` (Windows) or `lsof -i :<port>` (Linux/macOS) and terminate them if necessary. Many tools offer options to specify ports (e.g., `--dev-server-port`).
Verify that your add-in manifest path is correct, your development server is running and accessible, and that the specified Office application can be launched and sideloaded. Check logs for more specific errors.
Change the port used by your development server or the debugging proxy in your configuration (e.g., `package.json` scripts, `launch.json` in VS Code, or programmatic options). Alternatively, identify and terminate the process currently using the port.
Ensure `office-addin-node-debugger` is listed in your `package.json` dependencies and run `npm install` or `yarn install` in your project root. If in a monorepo, verify workspace configurations.
Validate your add-in's manifest (`npx office-addin-manifest validate <manifest-path>`), clear the Office cache and your browser's cache, and ensure your development server is sending appropriate HTTP headers to prevent caching of static assets.