Re: Watch window variables constantly out of scope
Upon further inspection, I see that I gave very little information in my initial post... thank you for the responses.
I'm on MP Lab X v5.25, using XC32 v2.1.
The variable I am trying to watch is part of a struct (data) that is dynamically allocated during the init phase of my task. I've tried making the appropriate elements volatile in the struct definition, however, the issue persists.
The variable is assigned during the initialization phase of the task and there are certain points in the while loop where I am able to see (the correct) contents. It just seems that when I'm in this case (maybe others too haven't checked) it is "out of scope". If I let the code run to the top of the switch statement (on the next loop iteration) I can again see the contents. However, at this point it is too late :)
I want to avoid making the variable global. This seems like a hack to me. I want to debug the code as it running in the same configuration in which it will run on release. The memory location that is referenced by the data pointer is valid and "alive", why can't I see it without manually going to the memory view? At this point I would be happy just to understand what it means with "out of scope". Clearly the variable is NOT out of scope as it was accesses in the same context one line above.
thanks for any and all help!