launch.json 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. {
  2. "version": "0.2.0",
  3. "configurations": [
  4. {
  5. "name": "layaAir",
  6. "type": "chrome",
  7. "request": "launch",
  8. "file": "${workspaceRoot}/bin/index.html",
  9. "runtimeExecutable": "${execPath}",
  10. "useBuildInServer": true,
  11. "sourceMaps": true,
  12. "webRoot": "${workspaceRoot}",
  13. "port": 9222,
  14. "fixedPort":false,
  15. "sourceMapPathOverrides": {
  16. "src/*": "${workspaceRoot}/src/*"
  17. }
  18. },
  19. {
  20. "name": "chrome调试",
  21. "type": "chrome",
  22. "request": "launch",
  23. "file": "${workspaceRoot}/bin/index.html",
  24. // "换成自己的谷歌安装路径,": 比如
  25. //window 默认安装路径为: "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"
  26. //mac 系统上的默认安装路径为 "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome";
  27. // "runtimeExecutable": "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe",
  28. "runtimeArgs": [
  29. "--allow-file-access-from-files",
  30. "--allow-file-access-frome-files",
  31. " --disable-web-security"
  32. ],
  33. "sourceMaps": true,
  34. "webRoot": "${workspaceRoot}",
  35. //假如谷歌调试报userDataDir不可用,请把谷歌安装路径取得管理员权限,或者更换${tmpdir}为其他可以读写的文件夹,也可以删除。
  36. "userDataDir": "${workspaceRoot}/.laya/chrome",
  37. "fixedPort":false,
  38. "sourceMapPathOverrides": {
  39. "src/*": "${workspaceRoot}/src/*"
  40. }
  41. }
  42. ]
  43. }