On Mac, launch browser using a dedicated profile. This will create directory remote-profile
in cwd.
% /Applications/GoogleChrome.app/Contents/MacOS/GoogleChrome --remote-debugging-port=9222 --user-data-dir=remote-profile
DevTools listening on ws://127.0.0.1:9222/devtools/browser/1f9619a3-abe2-449b-a81e-dde827123e20
Make sure that webroot
points to the webpack-built distribution of your extension that's loaded by the browser.
{
"name": "Attach to Chrome",
"port": 9222,
"request": "attach",
"type": "chrome",
"webRoot": "${workspaceFolder}/dist/chrome"
}
Multi-client debugging support is available for things like puppeteer. A chromium bug previously prevented this functionality.