VSCode自定义nodejs路径调试`无法加载源`

问题描述

我有一个由lerna管理的存储库。这是我的目录结构;

root
 |
 |-web
 |-studio

web是具有material-ui和TypeScript的next.js应用程序。

当我进一步运行调试器(进入)时,Visual Studio代码会抛出这些错误,而不是从源代码显示一步。

Could not load source '_n_e/node_modules/@material-ui/core/esm/styles/index.js': Failed sourceRequest: the requested source can't be found.

这是我的launch.json;

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more @R_234_4045@ion,visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0","configurations": [
    {
      "type": "firefox","request": "launch","name": "Next: Firefox","url": "http://localhost:3000",// This part added by VSCode pathMapping wizard.
      "pathMappings": [
        {
          "url": "webpack://_n_e/src","path": "${workspaceFolder}/web/src"
        }
      ]
    },{
      "type": "node","name": "Next: Node","runtimeExecutable": "npm","args": [
        "run","debug"
      ],"port": 9229,"console": "integratedTerminal","cwd": "${workspaceFolder}/web/"
    }
  ],"compounds": [
      {
          "name": "Next: Full","configurations": ["Next: Node","Next: Firefox"]
      }
  ]
}

除没有显示属于node_modules中模块的步骤点外,调试器还可以正常工作。我该如何解决这个问题?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)