Debugging Gatsby TypeScript in v2
See original GitHub issueWhat is the correct way to debug a v2 Gatsby project made in TypeScript?
I’ve managed to get the debugger running, thanks to debugging-the-build-process guide.
But it only worked for .js
files, like gatsby-node.js
, both in Chrome and VSCode.
Are there additional steps for TypeScript, or is it even possible?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:23 (21 by maintainers)
Top Results From Across the Web
Debugging the Build Process - Gatsby
VS Code Debugger (Auto-Config) · Press Ctrl + , or ⌘ + , to open your preferences. Type node debug into the search...
Read more >How To Set Up a Gatsby Project with TypeScript - DigitalOcean
This will set your project up for edits in later steps. Open your computer's console/terminal and run the following command: gatsby new gatsby- ......
Read more >What is needed that VS Code uses the inline sourcemaps of ...
When I debug with Gatsby build a new TypeScript file opens with the following content: (function (exports, require, module, __filename ...
Read more >How to debug Gatsby.js in VS Code (build process and client ...
If you want to debug the part when Gatsby creates pages (gatsby-node.js) then follow this steps: ... 7. In the Debug view select...
Read more >gatsby-typescript-scss-docker - CodeSandbox
gatsby. ^2.13.31 (2.32.13) · gatsby-plugin-react-helmet. ^3.1.2 (3.10.0) · gatsby-plugin-root-import. 2.0.5 · gatsby-plugin-sharp. 2.2.8 · gatsby-plugin-typescript.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
By using
source-map-loader
webpack plugin I’ve managed to sync sourcemaps, before there were similar issues as here.@m-allanson Should it be included by default in
gatsby-plugin-typescript
?Need to figure out how to make it work for
incline-source-map
.I’ve found a way to debug components with TypeScript in a web browser.
Add to
gatsby-node.js
As mentioned in other thread: https://github.com/gatsbyjs/gatsby/issues/6877#issuecomment-410581050
This will add
webpack-internal://
withsrc/
files where breakpoints work.