The MPLAB REAL ICE in-circuit emulator can work with PIC32MX device iFlowtrace (if available on the device – consult the device data sheet).
The PIC32MX architecture provides a method of program flow tracing where trace data is compressed, encoded and transmitted on 4 data lines and one clock line. This data is transmitted at key points or non-sequential instructions (e.g., branches, jumps) in the program flow. The cycle-by-cycle trace can then be reconstructed by MPLAB X IDE and displayed in the trace window.
To take advantage of this feature, some provisions must be made on the target, namely that 5 lines on the device be dedicated for tracing (4 data + 1 clock). These lines cannot be used for other data or a garbled trace may result.