Hi, whilst debugging code running on my XC161board i cant seem to modify the locals in the watch window. Does anyone know why this is?
If you are having a problem to debug your program because the locals (being in/out of scope) then go ahead and make them global (declare them with file scope and as volatile) until you are sure this is not your problem.
The debugger can modify local variables that are in registers.
Example: MEASURE.C function main () int i;
This variable is register R13 and can be modified.
So it must be a special case.
... is trying to view/change them when they are not in scope.
It happens to me about once a year that I goof in this way.
A really smart debugger would grey out locals and remove the value in the watch window when they are not in scope. Have not seen that in any debugger, but it would be a nice feature.
Erik