This document demonstrates how to debug firmware on a PIC microcontroller using the PICKit2 debugger in MPLAB IDE. It creates a simple blinking LED project in MPLAB using a PIC16F877 microcontroller and the CCS C compiler. The firmware is programmed onto the PIC16F877 using PICKit2. PICKit2 is then configured as a debugger to set breakpoints and inspect variables in the firmware using the debugging windows in MPLAB. This allows stepping through and analyzing the firmware to locate any issues.