"PC-lint for C/C++ the longest continuously advertised software tool in human history, was first introduced in 1985. It will thoroughly check your C/C++ source code for bugs, glitches, inconsistencies, non-portable constructs, and much more, so you can find and fix your bugs more quickly, and more economically, than with traditional debugging procedures
PC-lint for C/C++ runs on Microsoft Windows and OS/2" ---- (
https://www.gimpel.com/html/index.htm).
Unfortunately you need to pay for a licence to use this software and it can be quite difficult to setup for a PIC Microcontroller but well worth doing if you have the time. Once you have set it up for the first time it is easy to to again and again.
MPLab simulator is integrated into the MPLab IDE and allows you to simulate your code without running it on a PIC, You can simulate IO, ADC, Serial and step through your code using breakpoints. I find this useful if I begin writing code before the hardware is available. At your stage in the development process you will be better off running your software on your hardware platform. You can also do this from within MPLab which gives you a number of breakpoints which allow you to halt your code at specific places to view register and variable values. You can step through your code line by line to see that the correct decisions are being made.
What compiler do you use? and have you integrated it into MPLab?
If not this worth doing. I currently use the ccs compiler integrated into mplab v8.63. The latest version of MPLab is MPLabX which I believe has only recently begun supporting my third party compiler. I will be sticking to 8.63 for a little while longer as I am comfortable with the look and feel of it. MPLabX is totally different.
Is this a personal or work project. If it is for work do you have a quality management system in place to describe the software development cycle?