The present invention, in various embodiments, is directed to techniques for
providing debugging capability for program code instrumentation. In one embodiment,
an instrumentor inserts an instrumentation breakpoint at the beginning of a block
of original code. When this breakpoint is reached during execution of the application
program that includes the block of original code, the instrumenator, from the block
of original code, generates a block of instrumented code. This block of instrumented
code may include debugging breakpoints that are carried from the block of original
code or are inserted into the block of instrumented code during debugging. After
generating the instrumented code, the instrumentor executes the instrumented code
until debugging breakpoints are reached that stop the program flow, thereby allowing
a programmer to perform debugging functions at these debugging breakpoints.