VSCode调试Ember配置

  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\.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\.js
        }
    }]
}

你可能感兴趣的:(VSCode调试Ember配置)