Skip to content

Commit 93abad0

Browse files
authored
Fix launch.json to start chrome in a Sandbox
Normally, the Debugger for Chrome requires all instances of Chrome to be closed, including background instances, before it can re-start Chrome with remote debugging enabled. This is extremely annoying if you're a google-file, have 50 tabs open, inbox, google drive and a dozen other chrome apps running - they all have to be shut. Using this technique, you can instruct Chrome to start in a separate sandbox, with all settings saved to that temp path, and other processes won't be affected. Remote debugging will be enabled and you won't have to close your other instances. The one drawback of this is you'll have to install any other dev plugins again - but then you can always keep this 'sandbox' if you change the folder from 'temp' to another one.
1 parent 022f633 commit 93abad0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.vscode/launch.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
"request": "launch",
88
"url": "http://localhost:3000",
99
"sourceMaps": true,
10-
"webRoot": "${workspaceRoot}"
10+
"webRoot": "${workspaceRoot}",
11+
12+
//This line is important, since it instructs chrome to run in a separate, sandbox instance.
13+
//This way, other running chrome instances won't prevent remote debugging from running.
14+
"userDataDir": "C:\\temp\\chrom-dev-instance"
1115
},
1216
{
1317
"name": "Attach to Chrome, with sourcemaps",
@@ -18,4 +22,4 @@
1822
"webRoot": "${workspaceRoot}"
1923
}
2024
]
21-
}
25+
}

0 commit comments

Comments
 (0)