What is Debugging?

Legal Definition
Debugging is the process of finding and resolving of defects that prevent correct operation of computer software or a system.

Numerous books have been written about debugging (see below: Further reading), as it involves numerous aspects, including interactive debugging, control flow, integration testing, log files, monitoring (application, system), memory dumps, profiling, Statistical Process Control, and special design tactics to improve detection while simplifying changes.
-- Wikipedia
Legal Definition
1.fixing the problems in a software when it crashes, acts strangely, or is hacked. Refer to bug. 2. fixing existing errors or potential errors in a system to make is good for sale.