alexrp’s blog

ramblings usually related to software

SDB: Command Line Client for Mono’s Soft Debugger

Around two years ago, I wrote a command line client for Mono’s soft debugger because I was dissatisfied with having to use an IDE for all of my debugging. That’s inconvenient if you are, for example, working over SSH or for some other reason can’t run a GUI, or if you’re like me and prefer to work in Vim or Emacs, or whatever.

The client I wrote worked for the most part, but I wasn’t very happy with it:

  • The command language was crap. I tried too hard to make it well-structured as seen from a programmer’s point of view, resulting in a language that was extremely annoying to actually use.
  • The input prompt was basically Console.ReadLine. If you’ve ever used that and then something like GDB, you’ll know exactly why this sucks.
  • Configuring the debugger was done manually in an XML file. Need I say more?
  • Some very important features like remote debugging and method breakpoints were simply missing.
  • It had no actual plugin model, so you couldn’t write custom commands against a proper C# API and put them in a standard place to have them loaded at debugger startup.
  • The code was an unmaintainable mess. This was mostly because of my limited understanding of the soft debugger at the time.
  • It used binary dependencies in the repository because the debugging libraries had not yet been separated into the debugger-libs repository at the time.
  • It had little to no support for automation, testing, etc.

I could go on and on…

I figured rewriting the whole thing and getting these things right from the beginning would be easier than trying to salvage the old one, so I did that. The source can be found here, along with binary packages of releases.

The file has all the information you need to get started wtih it, so I won’t bother going into that here. Feel free to ask questions and post bug reports on the issue tracker. Pull requests are welcome too.