简体   繁体   中英

Issue debugging angular2 project

posted this on github but not sure if thats the right place to post. I've created a project using the latest angular-cli (beta.18). Seems the sourcemaps are incorrect as breakpoints in dev tools dont reflect where they are set:

import {Component, OnInit} from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent extends OnInit {
  ngOnInit(): void {
    this.dosomething();
  }

  title = 'app works!';

  dosomething() {
    this.title = "trying to do something";
    this.title = "trying to do something else";
  }
}

在此处输入图片说明

anyone else seeing this issue with projects build with angular-cli beta.18?

issue in github: https://github.com/angular/angular-cli/issues/1519

/Eric

A quick workaround for me was to update file node_modules/angular-cli/models/webpack-build-development.js in my project and replace cheap-module-source-map to source-map . Really annoying issue, almost got mad with it :)

这似乎已在最新版本beta.19-3中得到解决。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM