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

Source maps broken after moving from 0.23.0 to 0.26.1 #539

Closed
llicht opened this issue Mar 12, 2017 · 5 comments · Fixed by #584
Closed

Source maps broken after moving from 0.23.0 to 0.26.1 #539

llicht opened this issue Mar 12, 2017 · 5 comments · Fixed by #584
Labels

Comments

@llicht
Copy link

llicht commented Mar 12, 2017

I'm submitting a bug report

  • Library Version:
    0.26.1

Please tell us about your environment:

  • Operating System:
    Windows 7

  • Node Version:
    6.9.1

  • NPM Version:
    3.10.9

  • Language:
    Typescript 2.1.6

Previous behavior
In 0.23.0, sources (files in src dir) were correctly loaded both when using Chrome's debugger and when using VSCode with the chrome debugger extension.

Current behavior:
In 0.26.1, sources are not correctly loaded when debugging - Chrome shows my sources as empty and vscode doesn't let me put breakpoints in them.

Cause
It looks like the source map files generated by 0.26.1 have a sourceRoot of ".." while those of 0.23.0 have a sourceRoot of "../src"
Since the generated scripts sit in "./scripts" and the sources in "./src", it makes sense to me that "../src" (the old value) would work while ".." (the new value) wouldn't.

I've checked an auto-generated 0.26.1 aurelia-cli app and it seems to have the same problem, except it embeds the sources into the source maps which makes Chrome show them anyway - but vscode breakpoints still don't work since it still can't find the sources (and having the sources embedded in the source map doesn't help with that).

@JeroenVinke
Copy link
Collaborator

JeroenVinke commented Mar 14, 2017

Sourcemap root as ..
image

Sourcemap root as ../src
image

I believe ../src is the correct one since the src folder is at the same level of scripts on disk

@k2s
Copy link
Contributor

k2s commented Mar 16, 2017

please fix this issue, it is critical problem

@JeroenVinke
Copy link
Collaborator

@k2s are you also debugging from visual code or are you having issues in chrome for example?

@BringerOD
Copy link

I have not been able to figure out how do configure VS Code debugger.

I am using the latest CLI with typescript.

Does anyone have a launch.json example on how this should look?

Bryan

@JeroenVinke
Copy link
Collaborator

If you make these changes it will fix the issue. However, I did encounter what looks to be an issue in VSCode: microsoft/vscode#22711

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants