WinDbg... Now with JavaScript?

Don’t know if everyone here is a member of the WinDbg List, but just in case you missed this: It seems that you can now write WinDbg scripts in JavaScript.

Andy Luhrs (MSFT PM) posted a note about this, complete with links:

http:

Peter
OSR
@OSRDrivers</http:>

> It seems that you can now write WinDbg scripts in JavaScript.

Well, if things keep on progressing at this pace you will be able to write drivers in C# before the end of this millennium…

Anton Bassov

It makes total sense. I don’t know why it was not done sooner.

Not powershell? Strange decision…

The “object model” and LINQ in windbg commands are really overwhelming.
Scripting is not new, recall the Python extensions http://pykd.codeplex.com/
But Javascript for debugger scripting? A language where you cannot just add or compare two 64-bit numbers without weird gimmicks?

– pa

@Gerhart, we’ll have a blog post describing our decision around the language soon.

@Pavel, can you explain a bit more about what feels overwhelming about it?

Andy,

“Overwhelming” for me is the necessity to learn more of C# and .net than I ever had before.
This is very cool stuff, just a bit overflows my reading stack…

Also, my concern is that the new windbg has dependency on the .net runtime. Does it run on WinRE?
The “object model” is in core logic of windbg, it is not just for extensions, correct?

With best regards,
– pa

Completely understandable to feel that way. It’s a bit rough at first, but the angle is that we’re pushing everything to be more consistent, so once you know how to use the basics of LINQ, you can use it nearly any scenario. So rather than memorizing the syntax and set of flags of an extension like !process, then learning an entirely different syntax and set of flags for something like !handles, the skills needed to both of those are interchangeable.

For the .NET side of things, we have no dependency on .NET, all our LINQ support is native the debugger.

-Andy

Andy,

Do you have plans to ship definition files (IntelliSense) and add the
ability to debug scripts?
By the way, how come that this project
(https://github.com/alexbudmsft/dbgscript) is unrelated to your team?

Thanks.


@AndreyBazhan
http://www.andreybazhan.com

No plans to ship Intellisense files, but enough people have requested it that we can look into it. I’d recommend putting the request into the Feedback Hub (see the blog post for info), so that others can upvote it.

There’s a lot of debugger extensions released by Microsoft employees that we don’t have any relation to. It’s the nature of WinDbg’s extensibility and having such a large company.