To detect, locate, and correct logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more often used, especially when the problem is a major one.
To detect, diagnose, and eliminate errors in programs. Checking the logic of a program to isolate and eliminate the mistakes from a computer program or other software.