Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated sourcemaps in vscode build are broken. Blocks debugging vscode sourcecode with source maps #18363

Closed
nojvek opened this issue Jan 10, 2017 · 12 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded vscode-build VS Code build process issues
Milestone

Comments

@nojvek
Copy link
Contributor

nojvek commented Jan 10, 2017

After building .js.map files aren't emitting the right information

{"version":3,"file":"commonCodeEditor.js","sourceRoot":"file:///Users/noj/git/vscode/src","sources":["/src/vs/editor/common/commonCodeEditor.js"],"names":[],"mappings":";;;;;;IAAA;;;oGAGgG;IAChG,YAAY,CAAC;IA6Bb,IAAO,iBAAiB,GAAG,

This should be

{"version":3,"file":"commonCodeEditor.js","sourceRoot":"file:///Users/noj/git/vscode/","sources":["/src/vs/editor/common/commonCodeEditor.ts"],"names":[],"mappings":";;;;;;IAAA;;;oGAGgG;IAChG,YAAY,CAAC;IA6Bb,IAAO,iBAAiB,GAAG,

sources should be ts files and sourceRoot should not include src folder. This was working in december but I can no longer debug vscode source with source maps enabled.

I looked into build/lib/compilation.ts to see if I could figure it out. The build system looks quite complicated than what I am used to.

As a work around I am just going oldschool and debugging js files. Its a painful experience but gets the job done.

@mjbvz mjbvz added the vscode-build VS Code build process issues label Jan 10, 2017
@joaomoreno
Copy link
Member

@isidorn Did you look into this?

@joaomoreno joaomoreno changed the title REGRESSION: Generated sourcemaps in vscode build are broken. Blocks debugging vscode sourcecode with source maps Generated sourcemaps in vscode build are broken. Blocks debugging vscode sourcecode with source maps Jan 11, 2017
@joaomoreno joaomoreno added this to the January 2017 milestone Jan 11, 2017
@joaomoreno
Copy link
Member

joaomoreno commented Jan 11, 2017

The problem is not the sourceRoot attribute, but the sourcesContent which seems to have very little content...

@joaomoreno
Copy link
Member

The issue seems to appear during minification. Bundling, which happens right before minification, still keeps sane sourcemaps.

@joaomoreno
Copy link
Member

And when I build it locally, it actually works. What.

@bpasero
Copy link
Member

bpasero commented Jan 11, 2017

@joaomoreno make sure you do a clean npm install of all modules, I noticed this yesterday only on linux, scripts/test.sh --coverage was failing likely due to this issue.

@joaomoreno
Copy link
Member

Yup, cleaned, reinstalled, rebuilt. I still get good results on my machine. Will look into the build machine what's up.

@isidorn
Copy link
Contributor

isidorn commented Jan 11, 2017

@joaomoreno I did not look into this, I decided to go with js debugging as everyone in the team seems to be doing that.

@joaomoreno joaomoreno added the bug Issue identified by VS Code Team member as probable bug label Jan 11, 2017
@joaomoreno
Copy link
Member

This is super weird. I just rebuilt on our build machine and it works...

@joaomoreno
Copy link
Member

And I just realised @nojvek might just be talking about the dev build not the production build.

@joaomoreno
Copy link
Member

I won't have time to look into why this broke any time soon. @Microsoft/vscode if someone wants TS debugging, please look into this.

@joaomoreno joaomoreno removed their assignment Jan 11, 2017
@joaomoreno joaomoreno modified the milestones: Backlog, January 2017 Jan 11, 2017
@joaomoreno joaomoreno self-assigned this Jan 11, 2017
@joaomoreno
Copy link
Member

Found the issue. Well, found a fix. The issue is that no one understands sourcemaps. Neither do we nor anyone who develops libraries for sourcemaps.

@nojvek
Copy link
Contributor Author

nojvek commented Jan 11, 2017 via email

@jrieken jrieken added the verified Verification succeeded label Jan 26, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
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 verified Verification succeeded vscode-build VS Code build process issues
Projects
None yet
Development

No branches or pull requests

6 participants