I have declared Local variables with no optimization (level 0). Problem is local vars get assigned to register & I cannot view their values.
This can be done by declaring them volatile & global while debugging , but can it done without it.
Are you using uVision?
I have no problem seeing local variables in the watch window. They have to be in scope, of course.
Is the function declared inline? That may cause debugging problems.