From c5df39ef9ed6d024c1b4a80a4f217420746fa9cc Mon Sep 17 00:00:00 2001 From: yonatanLehman <32838532+yonatanLehman@users.noreply.github.com> Date: Mon, 25 Jan 2021 12:15:03 +0200 Subject: [PATCH] chore(docs): Update debugging-the-build-process (#29067) Co-authored-by: gatsbybot Co-authored-by: Lennart --- docs/docs/debugging-the-build-process.md | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) 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"