Implementing a debugger

March 13th, 2010

And now I finally took a day to implement a debugger for HAL. Admittedly it is a very rudimentary design with few options, but it does work. It turned out to be quite interesting in that it touched many aspects of programming

  • designing and implementing a user interface
  • ordering the implementation of features so they can be tested (i did the user interface first, so the breakpoint data could come from somewhere, and the breakpoint data structure before the hit testing etc.
  • compiler modification and debug format specification and generation
  • modifying the virtual machine to accommodate the debugger inside it
  • because the debugger is inline in the application, multiprogramming of the debugger display versus the rest of the program

All in all it was a lot of fun, and will help some of my colleagues and our partners a lot. Next up in the same area will be more polish on the debugger and many more IDE features for HAL in HansaWorld.

Erik

Debuggers

February 17th, 2009

Why is there no (great) improvement in debuggers? In the last few decades we have seen a huge amount of improvement in languages to improve development speed, but very little when it comes to debugging. The time it takes to go from an observed “badness” in the program (suspected bug) to understanding how it happend does not seem to decreases, and does not seem to have decreased. Instead it is becoming longer and longer as the complexity of the entire system increases.

The only “new” leap I can see in the last couple of decades is memory, threading and locking tools such as Valgrind, but nothing on the UI side of things (why is this checkbox 5 pixels to the right? How did that pixel become grey?) or stepping the program back.

Is there some great belief that I don’t share that modern systems are built up by fully debugged components and therefore this is not a problem? Am I wrong, and there has been serious improvement? Am I just using a bad methodology when debugging, and fancy tools are just what I ask for to hide my own lack of skill? Or am I just programming a type of software that is more complex than most, and therefor suffer in exess?

Admittedly, there is still no proper debugger available for the language I’m mostly maintaining, so perhaps I should not throw stones in my glass house.

Erik