美文网首页
使用VScode debug React项目

使用VScode debug React项目

作者: 与你清欢_李 | 来源:发表于2019-06-19 10:49 被阅读0次

需要安装最新版本的VS CodeVS Code Chrome Debugger Extension

然后将下面的块添加到您的launch.json文件中,并将其放在.vscode应用程序根目录下的文件夹中。

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Chrome",
      "type": "chrome",
      "request": "launch",
      "url": "http://localhost:3000",
      "webRoot": "${workspaceFolder}/src",
      "sourceMapPathOverrides": {
        "webpack:///src/*": "${webRoot}/*"
      }
    }
  ]
}

然后先npm start启动项目,在使用vscode debug

相关文章

网友评论

      本文标题:使用VScode debug React项目

      本文链接:https://www.haomeiwen.com/subject/vyshqctx.html