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__/*"
}
}
]
}
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"
}
]
}
- Activate a conda environment
pip install jupyter ipywidgets widgetsnbextension pandas-profiling