Skip to content

Issue debugging beta.18. Sourcemap issue? #2909

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
EricBichara opened this issue Oct 27, 2016 · 10 comments
Closed

Issue debugging beta.18. Sourcemap issue? #2909

EricBichara opened this issue Oct 27, 2016 · 10 comments

Comments

@EricBichara
Copy link

EricBichara commented Oct 27, 2016

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
screen shot 2016-10-26 at 07 20 26

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

@EricBichara EricBichara changed the title Issue debugging beta.18. Issue debugging beta.18. Sourcemap issue? Oct 27, 2016
@patrickoneill46
Copy link

Having this issue as well. It seems a 2-3 lines offset for me.

@Steveiwonder
Copy link

I have the same problem too, hits the break-point then when I attempt to step over it jumps to somewhere completely random.

@zackarychapple
Copy link
Contributor

after updating the project I was able to get this working again by going back down to beta.15 of just the cli.

@EricBichara
Copy link
Author

EricBichara commented Oct 27, 2016

Thanks @zackarychapple , did you change to beta.15 both globally and in the project?

@zackarychapple
Copy link
Contributor

@EricBichara just the project.

@chadbr
Copy link

chadbr commented 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
Copy link

@chadbr Thanks, modification of node_modules/angular-cli/models/webpack-build-development.js helped.

@michaeloryl
Copy link

I have the same problem. In my case it is 10 lines off, as you can see in the screen shot below.
breakpoint_offset_10

@filipesilva
Copy link
Contributor

Fixed in #2857

@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
clydin pushed a commit to clydin/angular-cli that referenced this issue Aug 29, 2023
This change adds the `--verbose` option to the SSR dev server.

closes angular#2909
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

8 participants