How do you view the return value of a function while you are debugging? FWIW I am using MPLAB with the C18 compiler for C source code and a PICKit3 for programming/debugging. Here is an example - lets say I have this simple function:
I know how to use the watch window to view the contents of variables, but is there any way to directly view the value that is being returned from the function? I know I could do this by creating a new variable and setting it equal to the result, and then use the watch window to get that value, but I don't want to have to restructure my code that way.
Rich (BB code):
int returnNumbers(void)
{
int num1 = 10;
int num2 = 5;
return (num1-num2);
}