process of tracing and correcting flaws in a software program or hardware device. In a complex program, it may take longer to correct the errors than originally to write the program. Debug aids are prewritten sets of computerized routines that assist in finding the BUGS.