James Hancock
James Hancock

Reputation: 3547

cannot get typescript debugging to work

I installed 0.81 and set the project execution to "Debug" and my project file has the typescript compiler stuff in and is creating source maps, but no debugging happens.

Breakpoints aren't hit and errors error into the .js file not the .ts file.

What am I doing wrong?

Upvotes: 1

Views: 1013

Answers (3)

N. Taylor Mullen
N. Taylor Mullen

Reputation: 18301

I'm assuming that you're using Visual Studio, in that case you can only debug TypeScript via a SourceMap supporting browser. A good example of one is Chrome Canary.

If you use chrome you wont be able to debug via VS's environment but you will be able to via the developer tools.

You can now also do this in IE via Visual Studio with the latest TS releases.

Hope this helps!

Upvotes: 2

James Hancock
James Hancock

Reputation: 3547

I found the issue. It's actually related to this item: Web Essentials linking ts files.

Basically without the fix posted on that link, Web Essentials was compiling the js file with all linked files included within the file. By using that updated version, it compiles just the current file. Once this is fixed, then IE 10, Chrome and new Firefox builds will all debug into the TS file as designed which is EXCELLENT.

Thanks for the tips!

Upvotes: 0

BreeeZe
BreeeZe

Reputation: 86

2 things why it didn't work for me :

  1. Be sure that you are referencing the .js file directly and you are not using the Mvc bundle functionality.
  2. Use IE10 so VS can hook into your browser.

Upvotes: 4

Related Questions