About a year ago, I set out to build an open-source command line debugger for .NET applications. Why would I do such a thing? Well, first it turns out that in some scenarios, you really can’t use Visual Studio — when you’re on a production box, for example. What about WinDbg, then? Even if you’re OK with WinDbg, which few people are, it has a fairly arcane syntax even for simple things, and it can’t be easily extended with .NET code. And finally, there are some really cool things that a debugger can do with the Microsoft CLRMD library, which provides a .NET API to the internals of the CLR heap, execution engine, threads, and call stacks. Thus, msos was born — a purely managed, command-line debugger that has a bunch of innovative commands. Innovative commands? Yes, like heap queries that filter and print heap objects based on their contents; like automatic deadlock analysis (with support for unmanaged synchronization mechanisms coming soon); like a simple to use system for analyzing a bunch of dump files and getting a quick triage result.
In this talk, I will share how I built msos, and show how some of its cool features can be used to solve complex bugs easier than ever before.