Code coverage provides visibility as to what portions of the code are being executed. To view code coverage output, an MPLAB XC C compiler that supports code coverage must be used with MPLAB X IDE. Support for code coverage begins with these versions:
In MPLAB X IDE, you can enable code coverage in the Project Properties window under a compiler category. Once enabled, debug your test code to execute it completely and then halt/pause. Select Window>Debugging>Code Coverage to see the percentage of covered code executed/total code covered in the Code Coverage tab window.
For more detailed coverage information, you can purchase an MPLAB Code Coverage add-on license (SW006026-COV). This will activate the full code coverage features of your compiler to include:
For more information, see: