Each individual instruction of the original program is sandwiched between the error-checking instructions. The run-time debugger's function is to correctly identify the errors and verify the accuracy of the original code. This particular technique for program modification is called code insertion . Code insertion can be implemented at different stages of the software development cycle. When insertion is done at the compilation stage, it is called source code instrumentation .
Insertion done directly on the executable or at the linking stage is called object code insertion .
The inherent advantages of source code implementation. Source code instrumentation involves parsing, analyzing, and converting the original source code into a new, equivalent source code. The equivalent code is stored in a temporary file that is passed to the compiler, which generates the object code. This is done in a manner that is completely transparent to the user. Throughout the process, the original source code file is not modified and the entire procedure does not require any user intervention.