6

Is there an easy way to step through TypeScript compiler (tsc.js) and observe how it works?

1 Answer 1

4

One way is to use Windows Script Host with //x key. You need Visual Studio installed, and you can't use source maps to debug over the original source.

Another way is to debug it in Node.js using tools like Nodeclipse or similar.

The easiest way is to debug it using Developer Tools embedded in any modern browser. There is a web page emulating platform IO and allowing to run TSC over it: http://mihailik.github.com/tsc.browser/

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

4 Comments

So Typescript compiled Javascript actually works in WSH.exe? Thats so awesome.
Is the tsc.browser project still active / moved? The link provided 404's.
It's been discontinued and I am redoing it in a full-blown IDE now. See at mihailik.github.com/teapo.
This may have worked in past, but with TypeScrpt 1.0.1, I tried using WSH+Visual Studio 2013, but it didnt work for me. I don't think it will work without some polyfills specifically Array.prototype.forEach() and Array.prototype.map(), JScript isn't ECMAScript 5 compliant AFAIK. Also with some polyfills added, I then ran out of stack space. I wound up using nodejs, installing and editing the typescript module and adding console.log() in places of interest. I am sure Eclipse would have worked but I know from experience that would have taken a while to install.

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.