google-chrome - VSCode Chrome Debugger disable web security
问题描述
I'm developing a remote application which need the web security disabled on Chrome, which I have a windows shortcut that takes the following runtime argument:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -incognito --disable-web-security --user-data-dir=C:\Program
For vscode, I have the following launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "web-security-disabled-chrome",
"url": "http://localhost:8000",
"runtimeArgs": [
"--disable-web-security --user-data-dir=C:\\Program",
"-incognito"
],
"webRoot": "${workspaceFolder}"
}
]
}
and it doesn't disable web-security.
Failed to load resource: net::ERR_CERT_AUTHORITY_INVALID [https://my.remote.ip/restapp/...
I also tried the following:
Give vscode a new directory for user data. I saw the folder got populated, but web-security is not disabled.
Put -user-data-dir into it's own string. VSCode shows error
Cannot connect to runtime process, timeout after 10000ms -(reason: Can't find a valid target taht matches: about:blank. Available pages: ["chrome-ex...://ceimgagkkofjoalgojpkdcmhmbljbbaa/_generated_background_page.html"]).
Does anyone know if it is possible to configure Chrome debugger to run web-secruity-disabled?
解决方案
对于证书问题,您应该添加以下命令行参数:
"configurations": [
{
"type": "chrome",
"request": "launch",
...
"runtimeArgs": ["--ignore-certificate-errors"]
}
推荐阅读
- pandas - 将列的数据类型从对象转换为数值
- java - 每隔一小时的 Java Sync 值
- php - php中的动态多级菜单
- mysql - 如何在 mysql 查询中使用 between 子句获取结果
- eclipse - 尽管安装了 CDT,但 Eclipse 插件中没有“转换为 C/C++ 项目”
- ios - iOS app name displayed on the device is wrong?
- python - user choicen variable removed off list
- docker - Jenkins with SSL over Docker
- ios - 如何使用约束从下到上为 UIView 设置动画?
- python - How to insert large amount of numbers inside a number efficiently?