1.首先在vscode中最左侧的扩展里边,下载debugger fo chrom,
安装成功后会有一个launch.json,修改内容:
1 { 2 "version": "1.4.0", 3 "configurations": [ 4 { 5 "name": "Creator Debug: Launch Chrome", 6 "type": "chrome", 7 "request": "launch", 8 "url": ": "http://localhost:7456", 9 ", 10 "sourceMaps": true, 11 "userDataDir": "${workspaceRoot}/.vscode/chrome", 12 "diagnosticLogging": false, 13 "pathMapping": { 14 "/preview-scripts/assets": "${workspaceRoot}/temp/quick-scripts/assets", 15 "/": "${workspaceRoot}" 16 } 17 } 18 ] 19 }