PURPOSE: To unnecessitate a trace function by hardware, to unnecessitate a processing concerning a trace when the trace is invalid and to trace the optional running step of a program when the trace is valid.
CONSTITUTION: When the trace function from an outside is validly indicated, first table 1 where the address of the running step in the program to be traced is stored is read out and the instruction of the address is saved in an instruction save area 4 so as to be rewritten to the instruction for generating interruption into a high-order level. When the instruction is executed, interruption is generated in the high-order level and data being necessary at every condition for collecting the respective addresses and traces in accordance with the second table 2 and the third table 3 is collected. When the collection of the traces is completed, the instruction saved in the instruction save area 4 is executed and control is transferred to the succeeding instruction of the instruction where interruption is generated. When the traces are not collected by the indication of the outside, the saved instruction is restored and the trace is not being conscious of.