vscode 如何使用模块联合动态系统主机模式调试微前端应用程序

How to debug a micro frontend app using module federation dynamic system host pattern in vscode

根据 Dynamic system host example 如何在 vscode 上配置调试?我可以调试主机应用程序但不能调试远程应用程序。

成功了。我在 WebStorm 中调试同一个应用程序时偶然发现了 folderName 之前有一个 @ 字符。

申请结构是-

  • 远程
    • .vscode
      • workspace-launch-config
  • 主机

所以 vs-code 中的工作启动配置是-

"launch": {
    "version": "0.2.0",
    "configurations": [
        {
            "type": "pwa-msedge",
            "request": "launch",
            "name": "Debug M3 @ 8080",
            "trace": true,
            "url": "http://localhost:8080",
            "webRoot": "${workspaceFolder:host}",
            "sourceMaps": true,
            "sourceMapPathOverrides": {
                "webpack://@${workspaceFolderBasename:remote}/*": "${workspaceFolder:remote}/packages/*",
                "webpack://${workspaceFolderBasename:host}/*": "${workspaceFolder:host}/*"
            }
        }
    ]
}