如何在没有网络安全的情况下配置 Chrome 浏览器launch.json
VS Code 中的文件?我安装了 VS Code 扩展Chrome 调试器我的 launch.json 看起来是这样:
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome",
"url": "http://localhost:8100/",
"webRoot": "${workspaceRoot}"
}
]
}
此代码启动带有网络安全的 Chrome。如何配置此文件,以便可以使用此参数启动 Chrome:chrome.exe --user-data-dir="C://Chrome dev session" --disable-web-security
只需添加
"runtimeArgs": [
"--disable-web-security"
],
所以你的 launch.json 看起来像:
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome",
"url": "http://localhost:8100/",
"runtimeArgs": [
"--disable-web-security"
],
"webRoot": "${workspaceRoot}"
}
]
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)