Skip to content

Commit

Permalink
Add VSCode debug configuration for the Gatsby build process
Browse files Browse the repository at this point in the history
This allows to debug Gatsby's development build process like the
implemented Node APIs (`gatsby-node-js`) and the configuration
(`gatsby-config.js`).

GH-129
  • Loading branch information
arcticicestudio committed Mar 9, 2019
1 parent c14b7c2 commit f0e148e
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (C) 2018-present Arctic Ice Studio <[email protected]>
* Copyright (C) 2018-present Sven Greb <[email protected]>
*
* Project: Nord Docs
* Repository: https://github.com/arcticicestudio/nord-docs
* License: MIT
*/

/**
* The Visual Studio Code debug configuration for Gatsby.
* @author Arctic Ice Studio <[email protected]>
* @author Sven Greb <[email protected]>
* @since 0.10.0
* @see https://github.com/Microsoft/vscode-recipes/tree/master/Gatsby-js
* @see https://www.gatsbyjs.org/docs/debugging-the-build-process
*/
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Gatsby Development Build Process",
"program": "${workspaceRoot}/node_modules/gatsby/dist/bin/gatsby",
"args": ["develop"],
"runtimeArgs": [
/*
* For performance reasons Node.js parses functions lazily on first access.
* As a consequence, breakpoints don't work in source code areas that haven't been parsed by Node.js.
* The `--nolazy` flag prevents the delayed parsing and ensures that breakpoints can be validated before
* running the code.
*
* @see https://nodejs.org/api/cli.html#cli_v8_options
*/
"--nolazy"
],
"stopOnEntry": false,
"sourceMaps": false,
"internalConsoleOptions": "openOnSessionStart"
}
]
}

0 comments on commit f0e148e

Please sign in to comment.