1

I would like to be able to debug TypeScript 1.0 code using Visual Studio 2012 with Web Essentials.

According to this YouTube video, you firdst need to set the "Generate Source Map" option to True to map the executing Javascript code to the original TypeScript source code.

Here's a snapshot from the video:

Demoed Options

However, look under Extensions andd Updates to see if I have the latest version of Web Essentials, it shows no Update available and that my version is 3.8. however, when I check my TypeScript options, there are much fewer options available and it does not include the "Mapping" option I am looking for:

enter image description here

I realize that TypeScript is new and evolving and I suspect that this functionality has possibly been de-implemented(?) but I was wondering what is the best and/or easiest way to step through TypeScript code?

1 Answer 1

1

The functionality has been removed from Web Essentials and added to WebTools 2012.2, which you can find here.

http://weblogs.asp.net/scottgu/announcing-release-of-asp-net-and-web-tools-2012-2-update

Now I can step through the TypeScript code directly. Very cool.

Sign up to request clarification or add additional context in comments.

4 Comments

Just an FYI about direct typescript debugging. There is a caveat with debugging typescript (which like you said is very cool). If you use the this keyword (for example: this.XYZ), if you put a breakpoint on that line and add a watch on 'this', the value of this will always show as null. This is because when javascript is generated, this keyword is changed to _this. So, you will have to add watch on _this.XYZ instead of this.XYZ. This might be a bug for current release of Typescript. Not sure. If someone found a fix for this, please share it here.
Update: I'm frustrated that Compile on Save and the Step through debugging that was working with 2012 broke until I did this: typescript.codeplex.com/wikipage?title=Compile-on-Save. Then that fixed it on my VS 2012 work machine, but I cant get the debugging to work on my 2013 machine. Frustrating. Everything changes so fast its hard to know if even what you read is stillr elevant
Can you provide more details about what issue you are having.
Thanks for the offer. I'll create a seperate post and add a link here. thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.