If I declare a global variable in C++ with GCC, the AVR Studio debugger will not recognize it. If I try to set a watch on the variable, it simply says "out of scope". I tried throwing extern "C" on it in case it was a name decoration issue, but that didn't help.
Local variables, including local static variables, are recognized OK. If compiled as C instead of C++, it also works fine.
I've had this problem with all versions of AVR Studio & WinAVR I've used, including the latest. Is this a known bug, and is there a work-around?