By "debugging" I mean the process of correcting a program which performs in some way incorrectly.
So let's break this down:
For something to debug let's consider a basic Turing machine (see this for the Wikipedia description which works well for what I am about to describe).
The details, I think, are really not very important so long as the machine is logically consistent.
The key for this is the representation of a program (in this case a Turing machine program) as a set of tuples. We can use the Wikipedia state table as an example (from Wikipedia):
|Current state||Scanned symbol||Print symbol||Move tape||Final (i.e. next) state||5-tuples|
|A||0||1||R||B||(A, 0, 1, R, B)|
|A||1||1||L||C||(A, 1, 1, L, C)|
|B||0||1||L||A||(B, 0, 1, L, A)|
|B||1||1||R||B||(B, 1, 1, R, B)|
|C||0||1||L||B||(C, 0, 1, L, B)|
|C||1||1||N||H||(C, 1, 1, N, H)|