Angular2应用程序 - Chrome脚本为空,VS2015不会遇到断点

时间:2016-01-04 20:17:06

标签: google-chrome debugging visual-studio-2015 angular

指向断点VS2015-Update1弹出'断点当前不会被命中。没有为此文档加载任何符号' * .js.map是在我的wwwroot / app目录中的* .js旁边生成的。该项目一切正常。 我也尝试在Chrome下进行调试但是我不能在sources / scripts / app.ts中删除断点,因为它是空的。 我的web.config修改为:

<staticContent>
    <remove fileExtension=".ts" />
    <mimeMap fileExtension=".ts" mimeType="application/x-typescript" />
</staticContent>

tsconfig.json有&#34; sourceMap&#34;:true

任何人都可以帮助或链接我VS2015 Angular2问候语,我可以在哪里打破断点?

Project tree - png

&#13;
&#13;
import { bootstrap } from 'angular2/platform/browser';
import { Component, View } from 'angular2/core';
import { NgFor } from 'angular2/common';
import { FORM_DIRECTIVES } from 'angular2/common';

@Component({
    selector: "my-app"
})
@View({
    template: `
    {{message}}
    <br/><input [(ngModel)]="message"/>
    `,
    directives: [FORM_DIRECTIVES]
})

class AppComponent {
    message: string = "Hello word";
}

bootstrap(AppComponent);
&#13;
&#13;
&#13;

message:string =&#34; Hello word&#34 ;;   - 这里我把断点

1 个答案:

答案 0 :(得分:1)

您正在使用ASP.NET 5项目模板(根据上传的项目树 - png)。 ASP.NET 5仍然在RC中,因此我确信调试功能将得到改进,但打字稿调试应该在Chrome中有效。请确保将映射文件中的正确相对路径设置为.ts源,并确保源文件确实存在于wwwroot下的正确目录中。如果设置不正确,您在Chrome中进行调试时会看到一个空白的.ts文件(如您所述)。

相关问题