Ramosta
Ramosta

Reputation: 647

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

Upvotes: 22

Views: 14535

Answers (1)

mumblesNZ
mumblesNZ

Reputation: 616

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}"
    }
  ]
}

Upvotes: 42

Related Questions