[0]Cannot launch program '/Users/xxx/Documents/work/code/lxxxx/.laya/launch.json'

Cannot launch program '/Users/xxx/Documents/work/code/lxxxx/.laya/launch.json'; setting the 'outDir or outFiles' attribute might help.ide 1.8.15 想运行 chrom调试 报错,
launch.json配置如下
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "chrome调试",
// "name": "启动程序",
"program": "${file}"
}
]
已邀请:

phhh

赞同来自:

vscode配置的问题不属于IDE的问题,可以参考vscode关于launc的配置方法

layabox

赞同来自:

你应该是改了配置导致的,你完全可以用1.8.15创建一个新的示例项目,然后把IDE自动创建的配置给复制进来用。
 
1.8.15 的IDE创建的默认配置为:
 
{
"version": "0.2.0",
"configurations": [
{
"name": "layaAir",
"type": "chrome",
"request": "launch",
"file": "${workspaceRoot}/bin/index.html",
"runtimeExecutable": "${execPath}",
"useBuildInServer": true,
"sourceMaps": true,
"webRoot": "${workspaceRoot}",
"port": 9222,
"fixedPort":false
},
{
"name": "chrome调试",
"type": "chrome",
"request": "launch",
"file": "${workspaceRoot}/bin/index.html",
// "换成自己的谷歌安装路径,": 比如
//window 默认安装路径为: "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"
//mac 系统上的默认安装路径为 "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome";
// "runtimeExecutable": "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe",
"runtimeArgs": [
"--allow-file-access-from-files",
"--allow-file-access-frome-files",
" --disable-web-security"
],
"sourceMaps": true,
"webRoot": "${workspaceRoot}",
//假如谷歌调试报userDataDir不可用,请把谷歌安装路径取得管理员权限,或者更换${tmpdir}为其他可以读写的文件夹,也可以删除。
"userDataDir": "${workspaceRoot}/.laya/chrome",
"fixedPort":false
}
]
}

要回复问题请先

商务合作
商务合作