by whartung · 3y ago · 0 comments
He was on a team building a Modula-2 compiler for OS/2, and his group was working on the debugger.
At some point a debugger becomes feature complete enough that you can use the debugger to ... debug the debugger.
But this was OS/2 which has true multiple processes (unlike it’s contemporary Windows 3.1). So you could, naturally, run the debugger in one process and attached it to another process which, just so happens to be another instance of the debugger.
As with all things, while doing this they encountered bugs in the debugger that, well, needed to be debugged.
He said there was a certain epiphany when they realized, because of the multi process nature of OS/2, that they could debug the debugger debugging the debugger.
I would imagine this took a bit of focus. Turn away for a moment and probably really messes with your head.
I honestly think one of the best parts of writing a debugger is being your own recursive customer. I think that's something you only get to do for a few things. Debuggers, languages/compilers, and operating systems. And probably a few others.
I think I once had to debug the debugger debugging the compiler compiling itself which felt like another really weird kind of recursion.
That said, even today when debugging Chrome DevTools with Chrome DevTools, window placement is key!!! Ideally, different screens. That keeps the mind clear.