How do I properly setup VS Code to debug in chrome, using an existing logged in Chrome user profile? How do I properly setup VS Code to debug in chrome, using an existing logged in Chrome user profile? google-chrome google-chrome

How do I properly setup VS Code to debug in chrome, using an existing logged in Chrome user profile?


Add "userDataDir": false to your launch config, like this:

{    // Use IntelliSense to learn about possible attributes.    // Hover to view descriptions of existing attributes.    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387    "version": "0.2.0",    "configurations": [        {            "type": "chrome",            "request": "launch",            "name": "Launch Chrome against localhost",            "url": "http://localhost:3000",            "webRoot": "${workspaceFolder}",            "userDataDir": false        }    ]}

BUT you must first quit all running instances of Chrome, because it's not possible to put a running Chrome user profile into debug mode. This is why the extension creates a new user profile by default.