美文网首页
VSCode调试Ember配置

VSCode调试Ember配置

作者: vincentx | 来源:发表于2017-12-07 19:00 被阅读112次
  1. 安装 vscode-chrome-debug
  2. 进行插件配置(配置如下)

launch.json

{
    "version": "0.2.0",
    "configurations": [{
        "name": "Launch Chrome against localhost, with sourcemaps",
        "type": "chrome",
        "request": "launch",
        "url": "http://localhost:4200",
        "sourceMaps": true,
        "webRoot": "${workspaceRoot}/app",
        "diagnosticLogging": true,
        "sourceMapPathOverrides": {
            "ember-debug-demo/*": "${workspaceRoot}/app/*" //ember-debug-demo is the project name i.e the name of the file generated in dist\assets\<Project Name>.js
        }
    }, {
        "name": "Attach to Chrome, with sourcemaps",
        "type": "chrome",
        "request": "attach",
        "port": 9222,
        "sourceMaps": true,
        "webRoot": "${workspaceRoot}/app",
        "diagnosticLogging": true,
        "sourceMapPathOverrides": {
            "ember-debug-demo/*": "${workspaceRoot}/app/*" //ember-debug-demo is the project name i.e the name of the file generated in dist\assets\<Project Name>.js
        }
    }]
}

相关文章

网友评论

      本文标题:VSCode调试Ember配置

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