diff --git a/docs/docs/debugging-the-build-process.md b/docs/docs/debugging-the-build-process.md index 766c21cec5cea..453f6bd1791cf 100644 --- a/docs/docs/debugging-the-build-process.md +++ b/docs/docs/debugging-the-build-process.md @@ -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", @@ -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" @@ -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"