I have this program:
using namespace std;
void f()
{
string s="hi";
cout<<s<<endl;
}
int main()
{
string s="abc";
f();
}
I put a breakpoint on the first line in main, start
debugging, and when it stops there, I watch "s" (by
hovering it with the mouse). After I press next, I can
see "abc" in the debug pane. Perfect so far.
Then I press step into, and I can still see "abc",
instead of the local "hi". After finishing the
execution, I start debugging again. Now I can just see
"not found in current context" and "?" in the debug pane.