How to remove debug pop up on add in load

Keith McClung 5 Reputation points
2023-03-24T09:39:49.4133333+00:00

Hello all,

Currently developing a JavaScript add-in for Microsoft word and are looking to start running live tests with users.

To facilitate this I wish to remove the following pop-up that appears when the add in button is pressed. (Clicking "cancel" does not stop the dialog from appearing in the future.)

A thread on StackOverflow has advised adding --no-debug to the package.json file (as below). Which has not been successful here.

Is there another setting I can change to remove the pop-up?

Thanks in advance!

User's image

"scripts": {
    "build": "webpack --mode production",
    "build:dev": "webpack --mode development",
    "configure-sso": "office-addin-sso configure manifest.xml",
    "dev-server": "node --inspect=localhost:8080 dist/middletier.js",
    "lint": "office-addin-lint check",
    "lint:fix": "office-addin-lint fix",
    "prettier": "office-addin-lint prettier",
    "start": "office-addin-debugging start manifest.xml --no-debug",
    "start:desktop": "office-addin-debugging start manifest.xml --no-debug",
    "start:web": "office-addin-debugging start manifest.xml --no-debug",
    "validate": "office-addin-manifest validate manifest.xml --no-debug"
  },
Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
4,707 questions
Word
Word
A family of Microsoft word processing software products for creating web, email, and print documents.
809 questions
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
969 questions
{count} votes

1 answer

Sort by: Most helpful
  1. VasimTamboli 4,905 Reputation points
    2023-05-19T06:30:03.77+00:00

    To remove the debug pop-up when running your JavaScript add-in for Microsoft Word, you can try the following steps:

    Open the package.json file in your project.

    Locate the "start" script in the "scripts" section of the package.json file. It should look like this:

    jsonCopy code
    "start": "office-addin-debugging start manifest.xml --no-debug"
    

    Remove the --no-debug option from the "start" script, so it becomes:

    jsonCopy code
    "start": "office-addin-debugging start manifest.xml"
    

    Save the package.json file.

    By removing the --no-debug option, the add-in will be launched without suppressing the debug pop-up. Now, when you press the add-in button, the pop-up should no longer appear.

    After making this change, you may need to rebuild or restart your project for the updated configuration to take effect.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.