Skip to content

Instantly share code, notes, and snippets.

@noghte
Last active June 27, 2022 14:34
Show Gist options
  • Save noghte/1fc0b50f7a02b2cd419b54c4152c2383 to your computer and use it in GitHub Desktop.
Save noghte/1fc0b50f7a02b2cd419b54c4152c2383 to your computer and use it in GitHub Desktop.

VS-Code

Debug React / GatsBy / NextJS

WSL

Contents of launch.json in Visual Studio Code (VSCode) when debugging React / GatsBy / NextJS web applications in WSL or WSL2:

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "WSL Chrome",
      "type": "chrome",
      "request": "launch",
      "url": "http://localhost:3000",
      "webRoot": "${workspaceFolder}/src",
      "sourceMapPathOverrides": {
        "/*": "/__vscode-remote-uri__/*"
      }
    }
  ]
}

Mac

Source:

First, get Executable Path by running chrome://version in Chrome. Then:

"configurations": [
    {
      "name": "Launch Chrome",
      "request": "launch",
      "type": "pwa-chrome",
      "url": "http://localhost:8000",
      "webRoot": "${workspaceFolder}/src",
      "runtimeExecutable": "/Applications/Chrome.app/Contents/MacOS/Google Chrome"
    }
]
  • This one also worked on mac:
{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "pwa-chrome",
            "request": "launch",
            "name": "Launch Chrome against localhost",
            "url": "http://localhost:8000",
            "webRoot": "${workspaceFolder}/src"
        }
    ]
}

Run Juptyer Notebook in a conda environment

Source

  1. Activate a conda environment
  2. pip install jupyter ipywidgets widgetsnbextension pandas-profiling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment