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\<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
        }
    }]
}
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容