[英]Issue debugging angular2 project
posted this on github but not sure if thats the right place to post. 将此发布在github上,但不确定那是否是发布的正确位置。 I've created a project using the latest angular-cli (beta.18).
我已经使用最新的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? 还有其他人在用angular-cli beta.18编译的项目中看到这个问题吗?
issue in github: https://github.com/angular/angular-cli/issues/1519 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
. 对我来说,一种快速的解决方法是在我的项目中更新文件
node_modules/angular-cli/models/webpack-build-development.js
,并将cheap-module-source-map
替换为source-map
。 Really annoying issue, almost got mad with it :) 真烦人的问题,几乎生气了:)
这似乎已在最新版本beta.19-3中得到解决。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.