when debugging in vscode in "launch chrome" mode, raises a nice and clean chrome instance, without any extension installed. It is good, but in some cases I need react-dev-tools extension and have to run regular chrome to get this done. Is it any way to have clean debugging chrome, but with dev tools added?
launch configuration is usual:
{ "type": "chrome",
"request": "launch",
"name": "Launch Chrome:3000",
"url": "http://localhost:3000",
"webRoot": "${workspaceRoot}"
}
To debug any project in either Chrome or Microsoft Edge, all you need to do is to start a session by pressing F5 or activating the debug icon in the menu bar and selecting “Run and debug”. Alternatively, you can also use the Visual Studio Code command palette and run the “Debug: Open Link” command.
To install React Devtools, visit the extension page for your browser of choice — Chrome or Firefox — and find the install button.
Try adding this line to your launch configuration, launch.json:
"runtimeArgs": ["--load-extension=${env:userprofile}/AppData/Local/Google/Chrome/User Data/Default/Extensions/fmkadmapgofadopljbjfkapdkoienihi/3.2.3_0"]
Some limitations
Sources
I was able to get the react-devtools tab with following steps.
I know there could be a better way. I think the chrome window opened by VScode must be protected from loading Extensions like in private mode. Answers welcome.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With