简体   繁体   English

Visual Studio-打字稿项目不同步

[英]Visual Studio - typescript project out of sync

I've got community 2015 version of Visual Studio. 我有Visual Studio的社区2015版本。 I'm working on a project in typescript and I've got problem with syncing modified datas with browser. 我正在使用打字稿进行项目,但在与浏览器同步修改后的数据时遇到了问题。 Typically i'm working on some part of code, debug it and change, then ctrl + save and ctrl + r to refresh browser. 通常,我正在处理部分代码,对其进行调试和更改,然后按Ctrl + Save和Ctrl + R刷新浏览器。 And It looks that newly generated source maps aren't applied becouse I still have old version of .ts code! 而且似乎没有应用新生成的源地图,因为我仍然具有旧版本的.ts代码! (but javascript is corrected). (但javascript已更正)。 So javascript and .ts arent synced eachother and it's really hard to debug. 因此javascript和.ts arent彼此同步,调试起来真的很困难。 What should I do to make it work? 我应该怎么做才能使其正常工作?

EDIT: 编辑:

ofc, My files are edited in Visual Studio, not in browser. ofc,我的文件是在Visual Studio中而不是在浏览器中编辑的。

ALSO: 也:

I noticed that in most cases it's good to work on anonymous mode in chrome. 我注意到在大多数情况下,在chrome中使用匿名模式是一件好事。 It helps to keep files synced (even I've got checked disable cache). 它有助于保持文件同步(即使我已选中禁用缓存)。

It helps to keep files synced (even I've got checked disable cache) 它有助于保持文件同步(即使我已选中禁用缓存)

For development you should return the file with cache disabled using http header: 对于开发,您应该使用http标头返回禁用了缓存的文件:

Cache-Control:no-cache, no-store, must-revalidate

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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