vscode launch.json 經常使用配置

{node

// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
    {
        "type": "chrome",
        "request": "launch",
        "name": "Launch Chrome against localhost",
        "url": "${file}",
        "sourceMaps": true, 
        "webRoot": "${workspaceRoot}"
    },
     {
        "name": "nodeLauch", //單獨調試js,便可以直接運行js
        "type": "node",
        "request": "launch",
        "program": "${file}", //這個配置成你要調試的文件、${file}當前打開的文件
        "stopOnEntry": false,
        "args": [],
        "cwd": "${workspaceRoot}",
        "runtimeExecutable": null,
        "runtimeArgs": [
            "--nolazy"
        ],
        "env": {
            "NODE_ENV": "development"
        },
        "console": "internalConsole",
        "preLaunchTask": "",
        "sourceMaps": false
    }
]

}web

相關文章
相關標籤/搜索