TypeScript icon indicating copy to clipboard operation
TypeScript copied to clipboard

Can no longer debug typescript files in Visual Studio 2013 Update 3

Open zenoware opened this issue 12 years ago • 28 comments

Not even sure how this has happened, but I was able to use Visual Studio and debug with Internet Explorer 11 for the longest time without any issues. Then, one day the breakpoints started not to load. After emptying the cache in Internet Explorer, they loaded again. Now, they are consistently not loading. The Script Document shows the javascript files that are compiled and I can debug in Firefox (even the typescript files) so I assume the map files are correct. I have reinstalled Visual Studio and IIS just to eliminate any of those being an issue, so I am now turning here and hopefully this is just some simple issue.

I have gone through at least 20 possible solutions for this issue and the fact that I can hit a breakpoints in the Script Documents tells me something is up.

zenoware avatar Aug 28 '14 06:08 zenoware

Can you debug a simple pure JavaScript files from VS2013?

basarat avatar Aug 28 '14 06:08 basarat

Yes, I can hit breakpoints that are javascript files even in that same project (IE. Knockout.js). It is only the typescript files I seem to not be able to trigger a break point claiming the symbols have not been loaded.

ghost avatar Aug 28 '14 07:08 ghost

@Zenoware what does this button say for you in IE11 debug tools:

image

basarat avatar Aug 28 '14 07:08 basarat

It does say the same thing as what you are displaying: debugging

ghost avatar Aug 28 '14 07:08 ghost

If you can debug the source maps correctly in FireFox but not in IE, you'll probably have to take this to the IE F12 tools team. I'll point them in this direction and see if they can follow up for more details.

RyanCavanaugh avatar Aug 28 '14 18:08 RyanCavanaugh

@Zenoware

Just to clarify you are not able to hit breakpoints in either VS or IE, but this works as expected in Firefox?

Are you able to hit breakpoints in Chrome? Which version of VS are you using, are any updates installed? Which version of IE are you using (can you paste the complete version number from the about box)?

Can you post the full last line from the generated js file you're having trouble with? The one which shows where to find the sourcemap.

paulvanbrenk avatar Aug 28 '14 20:08 paulvanbrenk

@paulvanbrenk to answer your questions:

this works as expected in Firefox?

  • Yes, I can debug the ts files from Firefox Are you able to hit breakpoints in Chrome?
  • Yes, just tested it and I can hit breakpoints in ts files. Which version of VS are you using, are any updates installed? vs

Which version of IE are you using (can you paste the complete version number from the about box)? ie Can you post the full last line from the generated js file you're having trouble with? First off, it is every single ts file i have. Even on different projects. Here is one example: //# sourceMappingURL=Forest.js.map

ghost avatar Aug 28 '14 23:08 ghost

@RyanCavanaugh Thanks for showing them this as well. If I cannot resolve this, I will attempt a few more things before reverting to re-installing windows (very last effort)

ghost avatar Aug 29 '14 01:08 ghost

I met the same problem. Update2 do not have this problem, you can uninstall the Update3. In the installation Update2。

ahbn avatar Aug 29 '14 01:08 ahbn

@ahbn That is a shame because isn't TypeScript 1.0 on Update 3? If it works, that is what I will do.

ghost avatar Aug 29 '14 02:08 ghost

@ahbn Reverting back to Update 2 did fix my problem! Thanks for the information. I am curious why this is an issue with Update 3? So there is a work around but still an issue that needs to be investigated. But is it an IE issue or a Visual Studio issue is something I am not sure about.

ghost avatar Aug 29 '14 05:08 ghost

I try to reinstall the system, directly install Update3 cannot breakpoint problems arose, and then I switched back to Update2, is normal, then I install Update3 again on this basis, the problem appeared again, so I feel that the problem may be Update3. Currently I use normal under the Update2.

ahbn avatar Aug 29 '14 06:08 ahbn

@Zenoware, can you please provide simple repro project for us to investigate? I would like to see your project settings, js file, map file contents and paths for sources etc. Do you see any message in output window of VS? VS normally shows the error why the source map cannot be read.

sheetalkamat avatar Aug 29 '14 17:08 sheetalkamat

I have the same issue with Visual Studio 2013 Update 3, everything is fine with Update 2.

Lenne231 avatar Oct 10 '14 08:10 Lenne231

For what it's worth I'm debugging TS with update 3 without issue in IE 11. I'm on Windows 8.1 (not sure if that's relevant)

johnnyreilly avatar Oct 10 '14 08:10 johnnyreilly

Same here. I cannot debug Typescript it in Visual Studio 12.0.30723.00 Update 3 while being perfectly able to debug regular javascript. Source maps are working in IE11 though so I can debug ts in IE11. All my teammates with Update 3 cannot debug ts in VS and the only guy who didn't bother with Update 3 can. Project runs on Local IIS.

Sleepyowl avatar Oct 15 '14 08:10 Sleepyowl

It's just occurred to me that I run my Visual Studio as an administrator (you can shift and right click to see "Run as administrator" on a context menu). It could be worth trying that to see if it makes a difference?

johnnyreilly avatar Oct 15 '14 09:10 johnnyreilly

I always run it with elevated rights so no, no effect.

Sleepyowl avatar Oct 15 '14 10:10 Sleepyowl

i have the same issue, only that im using --out and compiling multiple ts files into one js file and also creating the .map file. On chrome, it maps it correctly, however, on VS2013.3, when i put a breakpoint on the .ts file, it's hit, but it focuses on the wrong file.... it always focuses on the .js file. And not on the right line on the .js file, but rather on the line it should be on the .ts, but on the.js file. e.g: if i place breakpoint on line:15 on a.ts, when hit, it focuses on compiled.js line:15, although the relevant js code for a.ts could start on line:890 on compiled.js.

So 1) it focuses on wrong file and 2) focuses on wrong line in wrong file.

I have my VS2013.3 running as administrator. Again, it works fine on chrome, but not on VS.

AbubakerB avatar Oct 16 '14 09:10 AbubakerB

Hi, not sure if this will help but I had same issue before I realized I had

BundleTable.EnableOptimizations = true; in BundleConfig.cs

Settings this to false allowed me to debug in .ts files again. This is set to true by default.

Not sure what type of project template you are using. Hope this helps someone.

typescripter avatar Nov 12 '14 23:11 typescripter