Issue debugging beta.18. Sourcemap issue?
OS?
Mac OSX 10.12.1
Versions.
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
Having this issue as well. It seems a 2-3 lines offset for me.
I have the same problem too, hits the break-point then when I attempt to step over it jumps to somewhere completely random.
after updating the project I was able to get this working again by going back down to beta.15 of just the cli.
Thanks @zackarychapple , did you change to beta.15 both globally and in the project?
@EricBichara just the project.
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.
@chadbr Thanks, modification of node_modules/angular-cli/models/webpack-build-development.js helped.
I have the same problem. In my case it is 10 lines off, as you can see in the screen shot below.

Fixed in https://github.com/angular/angular-cli/pull/2857
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.