Skip to content

Instantly share code, notes, and snippets.

@sometimescasey
Created February 19, 2021 12:07
Show Gist options
  • Save sometimescasey/a777e02ea80c71b05f57412fdd67652d to your computer and use it in GitHub Desktop.
Save sometimescasey/a777e02ea80c71b05f57412fdd67652d to your computer and use it in GitHub Desktop.
launch.json for debugging React in VS Code
{
// 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": [
{
"name": "Launch localhost",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}",
"userDataDir": false,
},
]
}
@sometimescasey
Copy link
Author

sometimescasey commented Feb 19, 2021

Also note to self that I always have to:

  • shut down all open instances of Chrome
  • start debugging (hit Run, green arrow)
  • wait for the new Chrome window to open, URL bar will say about:blank
  • focus back on the VS Code window (where the bottom bar has now turned orange)
  • And then localhost:3000 will load

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment