DEBUGGING

How can see registers value in response to some external switch closed at run time ?

This is C/C++ - we're not concerned with registers, only variables.