using VisualStudio2010;
After attaching to a Process and pressing Pause (Break-All), you switch to the desired thread and use the Quick Watch window to check out some data, say
MySingletonClass.Instance.Data
Sometimes I either get this
Cannot evaluate expression because the current thread is in a sleep, wait, or join
or this (when trying to view certain properties of the data)
Cannot evaluate expression because a native frame is on top of the call stack.
Quite frankly, I don't care, I just want to see the data! I know there are various ways to get around this, namely
- setting a breakpoint on the thread and waiting till it gets hit (cumbersome, not always possible)
- taking a dump of the process and loading back into VS (even then I still get the 2nd error)
- windbg
Given you could see this data if you used windbg (I havent checked but assume you could) why is it we all can't take advantage of the much easier and prettier VS to inspect objects when attaching to a process?