I have to test and debug my arithmetic code for my servo controller. It's all fixed point math so there are lots of shifts and I have to check if every bit goes into the right place an no overflow occurs for all possible input values. I can feed in test cases from a table and print out the results but it would be very handy to have a single step debugger. It's not absolutely necessary but you find bugs a lot faster if you can look at all intermediate results and the C/Z flags while stepping through the code. Without a debugger you have to modify the code very often, add a print here and there... And when something crashes (write to the wrong address...) all you can do is "shotgun debugging", commenting part of the code out and see what happens.
I know that the P2 has hardware support for debugging but I haven't found a debugger so far, at least not a convenient one that works at the source level. I don't know if the ROM monitor could be used to step through assembler code.
But until a real debugger is avaliable we could probably put up some "manual single stepping". The CALL instructions of the P2 push the C/Z flags onto the stack so it's easy to make a "breakpoint" function that doesn't modify the state of the cog except for some hidden buffer pointer. It could then write all register/variables of interest and the flags to a buffer in hub RAM and wait for acknowledge to return and execute the next step. Then all we have to do is to insert a CALL #breakpoint between all instructions of the code to be tested. And of course we need a frontend running in another cog that prints out the buffer over the serial port.