You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
End up on a nonexistent line of the minified bootstrap-fork.js file
We are trying to debug the mapped lines of the minified file. The reason is that the sourcemap has "sources": ["bootstrap-fork.js"] so it points back at itself. It does have the source content inlined. So if it doesn’t have that property set then we would show the real source.
I assume we just throw all these js files into a minifier at some point. I think that whatever generates the sourcemaps is probably doing the right thing based on the info it has. Is it possible to post-process the sourcemaps that come out to patch this? I'm happy to investigate if someone can tell me where this happens.
Thanks! I have a fix, not sure how far to go with it. I could apply this to all .js files that get minified. But it looks like bootstrap-fork.js is the only file that normal users might step into besides loader.js. loader.js is technically wrong too but its relative path gets screwed up another way and ends up called vs/vs/vs/loader.js so it works.
For now I'll just rename bootstrap-fork.js. It will look like this:
The sources property is required on the sourcemap so the only way around is to rename the source. I'm not even sure what the debug adapter should do here, it could compare the content of the file on disk to what's inlined in sourcesContent but I don't think that's practical.
console.log
lineWe are trying to debug the mapped lines of the minified file. The reason is that the sourcemap has
"sources": ["bootstrap-fork.js"]
so it points back at itself. It does have the source content inlined. So if it doesn’t have that property set then we would show the real source.I assume we just throw all these js files into a minifier at some point. I think that whatever generates the sourcemaps is probably doing the right thing based on the info it has. Is it possible to post-process the sourcemaps that come out to patch this? I'm happy to investigate if someone can tell me where this happens.
cc @kieferrm
The text was updated successfully, but these errors were encountered: