Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

rewriteLocalizeCalls is messing up sourcemappings in vscode-node-debug #14

Open
roblourens opened this issue Jun 14, 2017 · 1 comment
Labels
bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@roblourens
Copy link
Member

In nodeDebug.ts, this comment exists at line 431:

/*
this._node.on('beforeCompile', (event: NodeV8Event) => {
	this.outLine(`beforeCompile ${this._scriptToPath(event.body.script)}`);
});

this._node.on('afterCompile', (event: NodeV8Event) => {
	this.outLine(`afterCompile ${this._scriptToPath(event.body.script)}`);
});
*/

After this comment, the sourcemappings are incorrect, making it very hard to debug. You can see this by building and using the sourcemap visualizer: https://sokra.github.io/source-map-visualization. There shouldn't be several mappings on these lines, on individual letters, etc:
image

It looks like the empty line between those two blocks is removed, and the subsequent mappings are all off by a line. Looking at the code, I have no clue why that would happen.

@roblourens
Copy link
Member Author

roblourens commented Jun 14, 2017

Actually I think it happens with any block comment that contains an empty line.

@TylerLeonhardt TylerLeonhardt added the bug Issue identified by VS Code Team member as probable bug label May 4, 2022
@TylerLeonhardt TylerLeonhardt added this to the Backlog milestone May 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants