Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Launching Chrome without web-securities in VS Code

How can I configure the Chrome Browser without web-security in launch.json file in VS Code? I installed the VS Code extension Debugger for Chrome and my launch.json seems so:

{
  "version": "0.2.0",
  "configurations": [

    {
      "type": "chrome",
      "request": "launch",
      "name": "Launch Chrome",
      "url": "http://localhost:8100/",
      "webRoot": "${workspaceRoot}"
    }
  ]
}

This code launch Chrome with web-securities. How can I configure this file so that I can launch Chrome with this parameter: chrome.exe --user-data-dir="C://Chrome dev session" --disable-web-security

like image 332
Ramosta Avatar asked Jun 07 '17 14:06

Ramosta


People also ask

How do I open Chrome with disable Web Security?

Right click on desktop, add new shortcut. Add the target as “[PATH_TO_CHROME]\chrome.exe” --disable-web-security --disable-gpu --user-data-dir=~/chromeTemp. Click OK.

How do I run Chrome insecure mode?

Right-click the Google Chrome desktop icon (or Start Menu link). Select Properties. At the end of the existing information in the Target field, add: " --allow-running-insecure-content" (There is a space before the first dash.) Click OK.


1 Answers

just add

"runtimeArgs": [
   "--disable-web-security"
],

So your launch.json will look like:

{
  "version": "0.2.0",
  "configurations": [

    {
      "type": "chrome",
      "request": "launch",
      "name": "Launch Chrome",
      "url": "http://localhost:8100/",
      "runtimeArgs": [
         "--disable-web-security"
       ],
      "webRoot": "${workspaceRoot}"
    }
  ]
}
like image 83
mumblesNZ Avatar answered Oct 19 '22 20:10

mumblesNZ