This project is read-only.

Visual studio 2013 Ultimate Update 5 using wrong dynamic TS files


This issue was addressed back in 2014 but does not seem to be solved correctly.

When debugging in visual studio a "dynamic" version of the typescript file is opened, but it is incorrect, old, has been updated. Yet the dynamic version is where the break point is hit.

I've tried "Build-Clean project". Showing the hidden files (.js and in solution explorer and deleting them before rebuilding which should (and does) recreate the files. Yet still for some reason a cached file remains and this is what is being used.

EDIT - workaround - Restarting Visual studio, results in the correct files loading... sometimes. Sometimes you have to restart numerous times and of course many times per day.


jamesnw wrote Sep 14, 2016 at 6:01 PM

Have you tried clearing your browser cache?

Chris_Leadville wrote Sep 14, 2016 at 6:39 PM

it is a visual studio issue. Typescript files are not used in the browser only JS files. The problem is that when debugging Visual Studio sometimes loads some old bogus file and calls it "dynamic" rather than the current one. Please see the original problem. There is a good video explaining it.

jamesnw wrote Sep 14, 2016 at 7:20 PM

My thought wasn't on the .ts file, it was on the map file that is used to locate the .ts (source) file, and if the map file was cached, it might that the .ts file pulled also get's cached. It was just a long shot. ;)

jamesnw wrote Sep 14, 2016 at 7:39 PM

Instead of restarting VS, try stopping IIS Express via the system/status tray instead, then retry, and see if that does anything.

Chris_Leadville wrote Sep 14, 2016 at 8:18 PM

I've tried that as well, it is definitely a problem with Visual studio. If before you begin any debug session you have the TS window you want open and set a breakpoint, it will break correctly. If then you step through to the code of a second file, then it loads some bogus version. Once it happens, it always seems to load the same bogus file when debugging until visual studio is restarted.

Chris_Leadville wrote Sep 14, 2016 at 8:20 PM

@jamesnw, I didn't see your earlier comment. I physically delete both the .js and the files. There are gone, so when recompiling they are created again new. Yet when you start the debug session (like the comment above), the same bogus file is loaded. It has to be cached in VS memory somewhere.

jamesnw wrote Sep 14, 2016 at 8:28 PM

Just a side note that you might get more responses posting in the new location to where the team has moved to: