【发布时间】:2021-12-23 17:14:05
【问题描述】:
在尝试为 VS Code 的 Microsoft Office 加载项调试器扩展运行调试器时,单击“播放”按钮时出现此错误:
在for Chrome 之前,我曾多次看到过这个问题,但没有专门针对 Microsoft Office 加载项。
我试过了:
- 重启 VS Code 并重启我的机器
- 运行
netstat -an | find /i "listening"以查看哪些端口正在我的机器上侦听,并尝试用这些端口中的每一个替换端口9222以获得launch.json 中的"port"值 - 尝试将端口密钥更新为目标端口
4200,(我的应用程序所在的端口,https://localhost:4200) - 验证 webRoot 是正确的路径。
- 完全删除 launch.json 中的
port键
作为参考,我正在 Windows 10 版本 1903 上的 Outlook 本机中运行此 Web 加载项。
据我所知,我的launch.json 似乎还可以:
{
// 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": "Launch index.html",
"type": "office-addin",
"request": "launch",
"file": "${workspaceRoot}/index.html",
"browserTarget": "Edge"
},
{
"name": "Launch localhost with sourcemaps",
"type": "office-addin",
"request": "launch",
"url": "http://localhost/mypage.html",
"sourceMaps": true,
"webRoot": "wwwroot",
"webviewTarget": "Edge"
},
{
"type": "office-addin",
"request": "attach",
"name": "Attach to Office Add-ins",
"port": 53483,
"trace": "verbose",
"url": "https://localhost:4200/index.html?_host_Info=Outlook$Win32$16.01$en-US$$$$0",
"webRoot": "${workspaceFolder}/app",
"timeout": 45000
}
]
}
我已经多次浏览文档here,但没有运气。有谁知道如何解决这个问题,以便我可以为我的 Outlook Web 加载项运行调试器?
【问题讨论】:
标签: visual-studio-code outlook windows-10 outlook-web-addins vscode-debugger