

Announcing TypeScript 0.8.1 with Source level debugging - yread
http://blogs.msdn.com/b/typescript/archive/2012/11/15/announcing-typescript-0-8-1.aspx

======
embwbam
I ported a project to TypeScript last week, and was very impressed with the
language. I had rejected it out of hand in favor of coffeescript, but didn't
realize how modern and expressive a type system they had created. Bug-catching
gains were immediate, and while it took a little bit to get comfortable with
its ins and outs, I'm excited about coding everything in JS again.

~~~
account_taken
100% agree. As much as I love CoffeeScript, the intellisense and type hinting
is an invaluable aid to our team. TypeScript is the answer to team
collaboration on large projects. There's no more guessing what the arguments
are, whether an argument is an object or string. Source maps is icing on the
cake.

~~~
teamonkey
I would be absolutely delighted if type hinting made its way into CoffeeScript
somehow.

~~~
embwbam
Yeah, my dream is a Typescript + Coffeescript dialect.

------
IanDrake
I just did a presentation on TypeScript last night and the biggest pushback
was debugging in JavaScript. I told them source maps where coming, I had no
idea it would be so soon though. Maybe next month we can have generics!

------
sergiotapia
This is huge! If there's one thing I miss about developing on the .NET stack
is the fantastic usage of breakpoints. It saves a lot of time.

Having to use "print_r", or "console.log" is a pain in the ass.

~~~
drchoc
Chrome's web debugger has break points. You can also place the word " debugger
" in your code and chrome will break at the debugger.

~~~
de90
No GP but, personally I don't feel it's as good as the VS debugger. Unless I
am missing something you still have to type into the console to get the value
of things you want instead of just hovering over things, or bringing up quick
watch in visual studio.

Also I'd imagine (haven't used it yet!) if you change the source in visual
studio while debugging it would save to a file, while I cannot do that in
chrome. I think I've heard it's possible in chrome, but never really seen how.

~~~
dmethvin
Chrome's debugger is darned near a full dev environment at this point, it's
just not documented all that well and a lot of the best stuff has only been
added recently. You can even edit the files, run the edited code, and save the
changes locally.

You know what's _really_ good about the Chrome debugger? It's free and it's on
every computer that runs Chrome. Visual Studio is neither of those. I really
wish they built VS functionality into the IE debugger.

As far as showing variables, one trick I use a lot is to set a conditional
breakpoint where the code to execute is `console.log(stuff), false` so that it
just logs stuff but doesn't ever stop. That's also handy for "fixing" variable
values without stopping.

~~~
ryanmolden
Does it have conditional breakpoints and tracing breakpoints? I find the
latter mostly entirely eliminate the need to sprinkle printf-equivalents to
follow complex flows. For full disclosure I work on VS, but not the debugger
or in Javascript, and I really don't know about Chrome's dev tools, but having
seen some people's approaches to debugging JS, it feels like it is in a
relatively primitive state from what I am used to in other languages.

~~~
dmethvin
Yes and yes.

~~~
ryanmolden
I see conditional breakpoints, where are the tracing variety?

EDIT: Oh, I see, from your comment you are just leveraging the conditional
breakpoint to ad-hoc them. That works but is a bit uglier than truly supported
tracing breakpoints, and wouldn't appear to offer things like dumping the
callstack to the output window or only triggering the print out only when
specific conditions are met (i.e. a conditional tracing breakpoint). I suppose
you could ad-hoc that as well by surrounding the print code with an
if(<condition>) { print stuff }, <condition>. Works, hacky, but works I
suppose.

------
candl
Is there any concise typescript reference around? The playground doesn't
showcase that much features. The language specification while extensive is not
that great as a cheatsheet.

~~~
embwbam
I read the language spec and skipped everything but the code samples. It
wasn't too bad, but yeah, not a cheatsheet.

------
mhd
Hmm, which other languages/compilers do support source maps right now?
CoffeeScript, HaXe, now TypeScript, anything else?

~~~
samg_
Google's Closure Compiler

