Datasheet

Specific Debug Functions: 8- and 16-Bit Devices
2013 Microchip Technology Inc. DS52085A-page 55
6.3 INSTRUMENTED TRACE
This section will discuss the available types of instrumented trace and how to use them.
6.3.1 Requirements for Trace
The following is required to use trace:
Devices that support trace. See “MPLAB X IDE Limitations” on the “Learn &
Discover” tab of the Start Page.
In-line assembly code (assembly code within C code) cannot be traced.
6.3.2 How Trace Works
Trace for the MPLAB REAL ICE in-circuit emulator (Instrumented Trace) is a solution
for providing basic trace information. Through the use of TRACE() and LOG() macros,
you can report program locations or variable values to MPLAB IDE while the applica-
tion is running and examine them via the Trace window once the application halts. You
may type these macro names in manually or right click in the editor and select the
macro to be inserted from the context menu. To log a variable value, the variable should
be highlighted before selecting from the context menu.
FIGURE 6-1: EXAMPLE OF INSERTED LOG MACRO