Open the Project Properties Window
To select a project's debugger, the project must be opened in MPLAB® X. After the project is opened, you will need to open the Project Properties window.
Select the Debug Tool to use
In the Hardware Tool section of the Project Properties window, select one of the available hardware tools as the programmer/debugger. You are allowed to select from several Microchip supplied hardware tools such as the ICD3, PICKit3, REAL ICE or StarterKit. While it is not technically a hardware tool, the MPLAB X simulator is also available to use as a debugger.
MPLAB X will search the system for available development tools. If a programmer/debugger is found, the Hardware Tool box will populate with the serial number of the attached device.
When a tool has been selected it will appear within a blue box in the Hardware Tool window.
Confirm the Selection
After you have selected the hardware tool to use, select Apply then OK.