Once trace hardware is set up, set up MPLAB® X IDE to use trace by performing the following steps.
Open Project Properties
Right click on the project name and select “Properties” to open the Project Properties window.
Select Real ICE
Click on “Real ICE” under “Categories”.
Set Up Instruction Trace
Set up any other trace-related options.
To start using trace, continue to Using Trace.