Skip to content

Instantly share code, notes, and snippets.

@alexandreramosdev
Created February 2, 2020 04:43
Show Gist options
  • Save alexandreramosdev/062add83253450ecb0b20de20ac581ce to your computer and use it in GitHub Desktop.
Save alexandreramosdev/062add83253450ecb0b20de20ac581ce to your computer and use it in GitHub Desktop.
Config Debug Gatsby Vscode
exports.onCreateWebpackConfig = ({ actions }) => {
actions.setWebpackConfig({
devtool: 'eval-source-map',
})
}
{
"version": "0.2.0",
"configurations": [
{
"name": "Gatsby develop",
"type": "node",
"request": "launch",
"protocol": "inspector",
"program": "${workspaceRoot}/node_modules/gatsby/dist/bin/gatsby",
"args": [
"develop"
],
"stopOnEntry": false,
"runtimeArgs": [
"--nolazy"
],
"sourceMaps": false
},
{
"name": "Gatsby build",
"type": "node",
"request": "launch",
"protocol": "inspector",
"program": "${workspaceRoot}/node_modules/gatsby/dist/bin/gatsby",
"args": [
"build"
],
"stopOnEntry": false,
"runtimeArgs": [
"--nolazy"
],
"sourceMaps": false
},
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome",
"url": "http://localhost:8000",
"webRoot": "${workspaceFolder}",
"runtimeExecutable": "/usr/bin/chromium" // I'm using Arch linux
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment