Beginner in Office add-ins and VS code here...
I followed the steps from this MS tutorial on creating an Excel custom functions add-in. Because I want to debug it using VS code, I had to create an Excel Custom Functions Add-in project option in the Yeoman generator, with TypeScript selected as the script type (according to MS).
The add-in works fine, but the related debugging tutorial from MS doesn't seem to work. Any breakpoint added appears as unbound, plus there's a "read source map" error, which might be related (see screenshot).
Any ideas how can I make this working?
Thank you for your time,
Adrian
Edit: this is the content of launch.json, I didn't change what Yeoman generated.
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Excel Desktop (Custom Functions)",
"type": "node",
"request": "attach",
"port": 9229,
"timeout": 600000,
"preLaunchTask": "Debug: Excel Desktop",
"postDebugTask": "Stop Debug",
"resolveSourceMapLocations": null
},
{
"name": "Excel Desktop (Edge Chromium)",
"type": "pwa-msedge",
"request": "attach",
"useWebView": true,
"port": 9229,
"timeout": 600000,
"webRoot": "${workspaceRoot}",
"preLaunchTask": "Debug: Excel Desktop",
"postDebugTask": "Stop Debug"
},
{
"name": "Excel Desktop (Edge Legacy)",
"type": "office-addin",
"request": "attach",
"url": "https://localhost:3000/taskpane.html?_host_Info=Excel$Win32$16.01$en-US$$$$0",
"port": 9222,
"timeout": 600000,
"webRoot": "${workspaceRoot}",
"preLaunchTask": "Debug: Excel Desktop",
"postDebugTask": "Stop Debug"
},
{
"name": "Office Online (Chrome)",
"type": "chrome",
"request": "launch",
// To debug your Add-in:
// 1. When prompted, enter the url (share link) to an Office Online document.
// 2. Sideload your Add-in. https://learn.microsoft.com/en-us/office/dev/add-ins/testing/sideload-office-add-ins-for-testing
"url": "${input:officeOnlineDocumentUrl}",
"webRoot": "${workspaceFolder}",
"preLaunchTask": "Debug: Web"
},
{
"name": "Office Online (Edge Chromium)",
"type": "pwa-msedge",
"request": "launch",
"port": 9222,
// To debug your Add-in:
// 1. When prompted, enter the url (share link) to an Office Online document.
// 2. Sideload your Add-in. https://learn.microsoft.com/en-us/office/dev/add-ins/testing/sideload-office-add-ins-for-testing
"url": "${input:officeOnlineDocumentUrl}",
"webRoot": "${workspaceFolder}",
"preLaunchTask": "Debug: Web"
}
],
"inputs": [
{
"id": "officeOnlineDocumentUrl",
"type": "promptString",
"description": "Please enter the url for the Office Online document."
}
]
}