A method of using a general-purpose microprocessor to debug a programmable logic controller, PLC, the method comprising: receiving at a main processing unit, MPU of the PLC, a debugging command from a personal computer, PC; at the MPU of the PLC, interrupting the driving of the PLC at an interrupt step; and resuming the driving of the PLC when the MPU completes debugging; characterized in that the method further comprises: receiving an interrupt step setting instruction to set the interrupt step from the PC; storing, in a temporal storage area of a data storage of the PLC, a step number for a location of the interrupt step and a compile code corresponding to the location of the interrupt step; substituting the compile code corresponding to the location of the interrupt step, in a compile code area of the data storage , with an exceptional interrupt code to set the interrupt step for the debugging; determining, if an exceptional interrupt for the debugging has occurred, whether a current mode is a debugging mode depending on whether the step number and the compile code of the interrupt step for the debugging are stored in the temporal storage area when executing a user's program step by step while driving the PLC; and interrupting the driving of the PLC at the interrupt step for the debugging when the current mode is determined to be the debugging mode. receiving at a main processing unit, MPU of the PLC, a debugging command from a personal computer, PC; at the MPU of the PLC, interrupting the driving of the PLC at an interrupt step; and resuming the driving of the PLC when the MPU completes debugging; characterized in that the method further comprises: receiving an interrupt step setting instruction to set the interrupt step from the PC; storing, in a temporal storage area of a data storage of the PLC, a step number for a location of the interrupt step and a compile code corresponding to the location of the interrupt step; substituting the compile code corresponding to the location of the interrupt step, in a compile code area of the data storage , with an exceptional interrupt code to set the interrupt step for the debugging; determining, if an exceptional interrupt for the debugging has occurred, whether a current mode is a debugging mode depending on whether the step number and the compile code of the interrupt step for the debugging are stored in the temporal storage area when executing a user's program step by step while driving the PLC; and interrupting the driving of the PLC at the interrupt step for the debugging when the current mode is determined to be the debugging mode. receiving an interrupt step setting instruction to set the interrupt step from the PC; storing, in a temporal storage area of a data storage of the PLC, a step number for a location of the interrupt step and a compile code corresponding to the location of the interrupt step; substituting the compile code corresponding to the location of the interrupt step, in a compile code area of the data storage , with an exceptional interrupt code to set the interrupt step for the debugging; determining, if an exceptional interrupt for the debugging has occurred, whether a current mode is a debugging mode depending on whether the step number and the compile code of the interrupt step for the debugging are stored in the temporal storage area when executing a user's program step by step while driving the PLC; and interrupting the driving of the PLC at the interrupt step for the debugging when the current mode is determined to be the debugging mode. <EOS>