【发布时间】:2016-04-08 12:51:39
【问题描述】:
指向断点 VS2015-Update1 弹出‘断点当前不会被命中。没有为此文档加载任何符号’ *.js.map 在我的 wwwroot/app 目录中的 *.js 旁边生成。该项目一切正常。 我也尝试在 Chrome 下调试,但我不能在 source/scripts/app.ts 中删除断点,因为它是空的。 我的 web.config 修改为:
<staticContent>
<remove fileExtension=".ts" />
<mimeMap fileExtension=".ts" mimeType="application/x-typescript" />
</staticContent>
和
tsconfig.json 有 "sourceMap": true
谁能帮助或链接我一个可以打断点的 VS2015 Angular2 hello word 吗?
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);
message: string = "Hello word"; - 这里我放了断点
【问题讨论】:
-
您需要填写有关上下文的更多详细信息 - 这没有多大意义。 Visual Studio 和 Chrome 是什么关系?如果没有更全面的问题,这个问题听起来是无法回答的。
-
关系是我目前通过 VS2015 的 IIS Express 托管它,但你没关系,它基本上是两个问题,第一个与 VS2015 调试有关,第二个与 Chrome ts 调试有关
-
我可能不太了解 VS+Chrome 的工作原理。他们相互联系的想法对我来说似乎很奇怪。查看代码,可能不涉及 Chrome,因为您正在设置 VS 断点。无论如何,我认为这个问题不能按原样回答。将其编辑为一个。
标签: google-chrome debugging visual-studio-2015 angular