1. A method of debugging code that executes in a multithreaded processor having a plurality of microengines comprising: inserting a segment of executable code into an unused section of a target microengine's microstore in response to a first context swap of one of a plurality of hardware-supported execution threads of a program executing in the target microengine; executing the segment of executable code; and resuming execution of the program in response to a second context swap.