Skip to content

Commit

Permalink
chore(docs): Update debugging-the-build-process (#29067)
Browse files Browse the repository at this point in the history
Co-authored-by: gatsbybot <[email protected]>
Co-authored-by: Lennart <[email protected]>
  • Loading branch information
3 people authored Jan 25, 2021
1 parent 6fc937f commit c5df39e
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions docs/docs/debugging-the-build-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,36 @@ Using built-in debuggers in code editors is very convenient. You will be able to

We won't go in depth here about how to debug in VS Code - for that you can check the [excellent VS Code documentation](https://code.visualstudio.com/docs/editor/debugging). We will however share a launch configuration needed to run and debug Gatsby:

### Linux

```json:title=launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Gatsby develop",
"type": "pwa-node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/.bin/gatsby",
"args": ["develop"],
"runtimeArgs": ["--nolazy"],
"console": "integratedTerminal"
},
{
"name": "Gatsby build",
"type": "pwa-node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/.bin/gatsby",
"args": ["build"],
"runtimeArgs": ["--nolazy"],
"console": "integratedTerminal"
}
]
}
```

### Windows

```json:title=launch.json
{
"version": "0.2.0",
Expand All @@ -92,6 +122,9 @@ We won't go in depth here about how to debug in VS Code - for that you can check
"type": "pwa-node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/.bin/gatsby",
"windows": {
"program": "${workspaceRoot}/node_modules/gatsby/dist/bin/gatsby"
},
"args": ["develop"],
"runtimeArgs": ["--nolazy"],
"console": "integratedTerminal"
Expand All @@ -101,6 +134,9 @@ We won't go in depth here about how to debug in VS Code - for that you can check
"type": "pwa-node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/.bin/gatsby",
"windows": {
"program": "${workspaceRoot}/node_modules/gatsby/dist/bin/gatsby"
},
"args": ["build"],
"runtimeArgs": ["--nolazy"],
"console": "integratedTerminal"
Expand Down

0 comments on commit c5df39e

Please sign in to comment.