5.6.4 Set Up Instruction Trace in MPLAB X IDE

To set up MPLAB X IDE to use trace for the MPLAB ICE 4 in-circuit emulator:

  1. Right click on the project name and select “Properties.” In the Project Properties dialog, click on “ICE4” (under “Categories”).
  2. Under “Option categories,” select “Trace and Profiling.”
  3. Under “Data Collection Selection,” choose “Instruction Trace/Profiling.”
  4. Set up any other trace-related options.
  5. Click OK.

On a Debug Run, trace will continue to fill the trace buffer with data, rolling over when the buffer is full, until a program Halt.