Skip to content

Debugging/Sourcemaps do not work at all in OSX Chrome 54 #3080

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

Closed
intellix opened this issue Nov 9, 2016 · 6 comments
Closed

Debugging/Sourcemaps do not work at all in OSX Chrome 54 #3080

intellix opened this issue Nov 9, 2016 · 6 comments

Comments

@intellix
Copy link
Contributor

intellix commented Nov 9, 2016

Versions.

angular-cli: 1.0.0-beta.19-3
node: 5.12.0
os: darwin x6 (OSX Sierra)
browser: Chrome Version 54.0.2840.98 (64-bit)

Repro steps.

ng new something
cd something
ng serve

go to Chrome and press Cmd + P to search for a file to place a breakpoint

Mention any other details that might be useful.

I'm still unsure if debugging is meant to be working or not. I'm using the latest 19-3 and still when I do Cmd + P to find a file and place a breakpoint, all I see are ngfactory files.

Isn't AOT supposed to be behind a flag, why does it run during development?

Was expecting to see app.component.ts but just see factories: https://www.dropbox.com/s/02gbjuqp73t2you/Screenshot%202016-11-09%2016.01.31.png?dl=0

If I look inside node_modules/angular-cli/models/webpack-build-development.js, I'm seeing source-map instead of the cheap one, so I don't think I'm running old code. I'm really confused as I haven't seen anyone else bring up any of this yet.

@intellix
Copy link
Contributor Author

intellix commented Nov 18, 2016

Still impossible to debug in beta.20
Source maps aren't created and they don't exist.
aot = false still creates and uses an ngfactory file
aot = true creates one bundle containing ngfactories

Would love a bit of clarification what the story is here: @filipesilva as commits like: #3080 don't make sense.

@nbuso
Copy link

nbuso commented Nov 18, 2016

Hi I just tried, I'm on this version:
$ ng --version
angular-cli: 1.0.0-beta.20-4
node: 6.6.0
os: linux x64

In the source pane of chrome I can Ctrl+P and look for app.component.ts and it's exactly the source code generated by the CLI. Do you have a way to share your generated project?

@intellix
Copy link
Contributor Author

intellix commented Nov 18, 2016

Right ok so it's just me then.
Just tried removing and reinstalling all node versions and installing from scratch:

nvm remove 4 && nvm install 4 // Now using node v4.6.2 (npm v2.15.11)
ng new node4 // outright failed with: Cannot find module '@angular/tsc-wrapped/src/tsc'
nvm remove 5 && nvm install 5 // Now using node v5.12.0 (npm v3.8.6)
ng new node5 && cd node5 && ng serve // no app.component.ts in cmd+p
nvm remove 6 && nvm install 6 // Now using node v6.9.1 (npm v3.10.8)
ng new node6 && cd node6 && ng serve // no app.component.ts in cmd+p
nvm remove 7 && nvm install 7 // Now using node v7.1.0 (npm v3.10.9)
ng new node7 && cd node7 && ng serve // no app.component.ts in cmd+p

Going into each of them and looking at tsc version:

./node_modules/.bin/tsc -v // Version 2.0.10

None of them worked. Is this a problem with OSX only or?

@intellix intellix changed the title Debugging - still not possible in 19-3 Debugging/Sourcemaps do not work at all in OSX for any Node version Nov 18, 2016
@intellix intellix changed the title Debugging/Sourcemaps do not work at all in OSX for any Node version Debugging/Sourcemaps do not work at all in OSX Chrome 54 Nov 18, 2016
@intellix
Copy link
Contributor Author

intellix commented Nov 18, 2016

I'm seeing the source code in Firefox, so now I need to drill down a little further to see how to get them in Chrome. Maybe it's not possible to get Webpack:/// URLs as I don't see them here:
screenshot 2016-11-18 12 49 47

Firefox component.ngfactory.ts has this at the end, which Chrome does not: //# sourceURL=/AppModule/AppComponent/wrapper.ngfactory.js

Found that it works in Canary: Version 56.0.2924.0 canary (64-bit)

@intellix
Copy link
Contributor Author

ok... at some point JavaScript sourcemaps were disabled... I have no idea when but it seems that was the case -.-

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants