In this paper we introduce a new concept called relative debugging, which supports the incremental development of computer programs. Relative debugging makes it possible to compare the execution of two programs with the same functionality. The programs can run on the same computer, or on different computers connected by a network. They can differ in their source programming language or in implementation details. One of the programs usually serves as a reference version which produces the desired results. The execution of the other process is compared to the reference version in order to find discrepancies.
We describe basic primitives for relative debugging and their implementation in a debugger called Guard. Guard is built on top of our portable debugging interface which provides a debugging platform for heterogeneous environments. The utility of Guard is illustrated by a practical example, in which a program written in Fortran is used to find errors in a version of the same code written in the C programming language.