Debugging with Visual Studio 2010 and VB.NET: Immediate fails due to proection level

Posted by marco.ragogna on Stack Overflow See other posts from Stack Overflow or by marco.ragogna
Published on 2010-06-15T09:10:06Z Indexed on 2010/06/15 9:12 UTC
Read the original article Hit count: 664

It happens quite frequently, more times per day, that with Visual Studio 2010, during the debugging, when I used Immediate commands like:

? NamedVariable

I receive the following error:

'NamedVariable' is not declared. It may be inaccessible due to its protection level.

In this case also other debug features seems gone, but I can set breakpoints, step into, step over, etc.

The solution is stop debugging, clean and rebuild the project, and retry.

I am developing a VB.NET Windows Forms application, but it happened with VB.NET WPF projects too. I never had this behavior with VS 2008.

Is this a known bug or could it be a problem of my environment/installation? Do you have any idea how to solve this little, but annoying issue?

© Stack Overflow or respective owner

Related posts about debugging

Related posts about visual-studio-2010