SourceMaps don't bind on latest next.js version server side (Docker)
See original GitHub issueDescribe the bug
Next.js now uses eval-source-map
from version 9 onwards.
It looks like eval-source-map
generates webpack-internal:///./
references.
I added the settings below but it makes no difference:
"sourceMapPathOverrides": {
"webpack-internal:///./": "${workspaceFolder}/"
}
I wonder if https://github.com/microsoft/vscode-js-debug/blob/e2191de3d65c8e90be183bd545ec8441972566a2/src/targets/browser/browserPathResolver.ts#L111-L113 has anything to do with it?
Should webpack-internal:///./
be added to this list?
https://github.com/microsoft/vscode-js-debug/blob/4d7737fbb65cf6485bd333e03f5319ceafaa797e/src/configuration.ts#L931-L939
To Reproduce Steps to reproduce the behavior:
- Clone https://github.com/jasonwilliams/nextjs9-typescript-server-vscode-example
- yarn install
docker-composer up
- Launch -> launch server (Docker)
- set a breakpoint in pages/index.tsx
Log File
VS Code Version: 1.51
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (15 by maintainers)
Top Results From Across the Web
Advanced Features: Debugging - Next.js
This documentation explains how you can debug your Next.js frontend and backend code with full source maps support using either the VS Code...
Read more >Debugging Next.js Applications - elliott.dev
Next.js has source maps enabled by default in dev mode, so you'll see your uncompiled source code, and you can navigate to a...
Read more >unable to debug Next.js app using visual code - Stack Overflow
js app in visual studio code using google chrome. Below is my launch.json file code : { "version": "0.2.0", "configurations ...
Read more >Debugging Node.js projects with TypeScript and VS Code
While they are also applicable to both client-side & server-side projects, ... Sourcemaps are used in JavaScript & other languages ...
Read more >TypeScript debugging with Visual Studio Code
TypeScript debugging supports JavaScript source maps. ... If generated (transpiled) JavaScript files do not live next to their ... Client-side debugging.
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 FreeTop 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
Top GitHub Comments
Actually, the scenario is narrower than I thought. For data URI sourcemaps, we use the path of the compiled file to see if we should resolve it. I put in a fix to remove the “protocol”, so
webpack-internal:///./pages/index.tsx
will turn into/pages/index.tsx
for matching purposes, which the default glob is capable of dealing with. So I put in a targeted fix.@roblourens make sure to remove the
sourceMapPathOverrides
section as well – apologies for not posting easy verification steps in a long thread:Closing for re-verification attempt