1、vscode安装插件 JavaScript Debugger(Nightly)
2、调试配置,路径.vscode/launch.json
如下
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| { "version": "0.2.0", "configurations": [ { "type": "chrome", "request": "launch", "name": "Cocos Chrome", "url": "http://localhost:7456", "sourceMaps": true, "userDataDir": "${workspaceRoot}/.vscode/chrome", "diagnosticLogging": false, "webRoot": "${workspaceRoot}", "sourceMapPathOverrides": { "assets/*": "${workspaceRoot}/assets/*" }, "runtimeArgs": ["--disable-web-security"], "pathMapping":{ "/preview-scripts/assets": "${workspaceRoot}/temp/quick-scripts/assets", "/": "${workspaceRoot}" }, "runtimeExecutable" : "C:/Program Files/Google/Chrome/Application1/chrome.exe" } ] }
|