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
angular-cli: 1.0.0-beta.18
node: 6.8.1
os: darwin x64
Npm: 4.0.0
Chrome: 54.0.2840.71
Repro steps.
new project created with "ng new testproject". Changed only to the following code in app.component.ts
import {Component, OnInit} from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
ngOnInit(): void {
this.dosomething();
}
title = 'app works!';
dosomething() {
this.title = "trying to do something";
this.title = "trying to do something else";
}
}
In chrome dev tools, breakpoint doesn't seem to match the scope
I've tested in my other projects which i've updated to beta.18, get the same issue.
Also tried reinstalling angular-cli to make sure there where no issues there:
npm uninstall -g angular-cli
npm cache clean
npm install -g angular-cli
ng new testproject
See the fix in #2811 from @un33k - this has been fixed in master for the next release.
un33k commented 6 days ago • edited
I also confirm the line number issue in beta.18. A quick workaround for me was to update this file node_modules/angular-cli/models/webpack-build-development.js in my project and replace cheap-module-source-map to source-map. Takes much longer to compile, but line numbers are matching on breakpoints.
Activity
[-]Issue debugging beta.18.[/-][+]Issue debugging beta.18. Sourcemap issue?[/+]patrickoneill46 commentedon Oct 27, 2016
Having this issue as well. It seems a 2-3 lines offset for me.
Steveiwonder commentedon Oct 27, 2016
I have the same problem too, hits the break-point then when I attempt to step over it jumps to somewhere completely random.
zackarychapple commentedon Oct 27, 2016
after updating the project I was able to get this working again by going back down to beta.15 of just the cli.
EricBichara commentedon Oct 27, 2016
Thanks @zackarychapple , did you change to beta.15 both globally and in the project?
zackarychapple commentedon Oct 27, 2016
@EricBichara just the project.
chadbr commentedon Oct 27, 2016
See the fix in #2811 from @un33k - this has been fixed in master for the next release.
un33k commented 6 days ago • edited
I also confirm the line number issue in beta.18. A quick workaround for me was to update this file node_modules/angular-cli/models/webpack-build-development.js in my project and replace cheap-module-source-map to source-map. Takes much longer to compile, but line numbers are matching on breakpoints.
Autushka commentedon Oct 27, 2016
@chadbr Thanks, modification of node_modules/angular-cli/models/webpack-build-development.js helped.
michaeloryl commentedon Nov 2, 2016
I have the same problem. In my case it is 10 lines off, as you can see in the screen shot below.

filipesilva commentedon Nov 2, 2016
Fixed in #2857
angular-automatic-lock-bot commentedon Sep 6, 2019
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.
feat(@nguniversal/builders): add `--verbose` option to SSR Dev Server