I'm trying to get debugging of Office Add-ins working through VS Code. I've installed the Microsoft Office Add-in Debugger extension as well as the Debugger for Chrome extension. I have a section in my launch.json file that has a preLaunchTask that uses start:web.
I'm confused about how this process works, currently it opens two chrome windows, which I didn't expect. It looks like only one of the windows will actually cause VS Code to break on my breakpoints.
I'd like to hard code my document URL while debugging, so I don't have to keep entering it with an inputs promptString. I guess I'm confused about how these two files work together to start debugging and where do I need to enter the URL to my Excel file in SharePoint.
launch.json
{
"name": "Office Online (Chrome)",
"type": "chrome",
"request": "launch",
"webRoot": "${workspaceFolder}",
"preLaunchTask": "Debug: Web",
"url": "https://UrlToMyTestExcelDocumentInSharePoint"
}
tasks.json
{
"label": "Debug: Web",
"type": "npm",
"script": "start:web -- --document https://UrlToMyTestExcelDocumentInSharePoint",
"presentation": {
"clear": true,
"panel": "shared",
"showReuseMessage": false
},
"problemMatcher": []
}