I apologize in advance if I'm being an idiot, but would someone please put me out of my misery and tell me how to watch a variable while debugging in MPLAB?
All I'm trying to do is watch the value of an integer variable which should be changing as I change the voltage applied to a pin. I've copied part of the code in below incase it's relavent to my question (I want to know the value of "result"):
Build your project and open Debugger, before Runnning the code goto the View menu and open the File Registers (Down/restore that screen) and then you can also open a Watch Window where you can add in which system registers you may also want to see like ADRESL etc.
Once you have organised all those windows on your desktop, press f7 to single step through your code and watch the registers change.
If you have long delays etc, then use Breakpoints in your code, so you can F9 Run past the delay bit and then resume the single step.