在VS代码中启动没有网络安全的Chrome [英] Launching Chrome without web-securities in VS Code
本文介绍了在VS代码中启动没有网络安全的Chrome的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
launch.json
文件中配置没有网络安全的Chrome浏览器?我安装了Chrome的VS代码扩展调试器,我的启动.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}"
}
]
}
这篇关于在VS代码中启动没有网络安全的Chrome的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文