项目中使用到了Blazor Web Assembly,之前启动调试都正常,会默认打开我的Chrome浏览器,欢乐的跑着,突然有一天启动调试时报错:Cannot connect to the target at localhost:5001: Could not connect to debug target at http://localhost:9222: Promise was canceled.

这个错误整整光了两个小时在全网找解决方案,然而前不满意,其中一个比较接近的答案如下:
https://www.gitmemory.com/issue/microsoft/vscode-js-debug/775/703945845

我的最终解决方案如下:

💰 此内容为付费阅读 请先登录