08.01.2018, 18:49
There is actually a mechanism already implemented into the abstract machine, called the "debug hook". It's basically a callback function that gets called on every BREAK opcode. Check the PAWN implementers guide on this for more information. There is also a whole chapter dedicated to debugging support.