Debugging nightmare: cannot drill down into object collections in QuickWatch window

My colleague and I have recently upgraded our projects from .NET Framework 1.0 and VS2002 to .NET Framework 2.0 and VS2005. We also applied the latest VS2005 service pack.

Our problem: normally when debugging we use the QuickWatch window to drill down into and view collections of objects belonging to the parent object we are "watching". THIS NO LONGER WORKS...instead, we get a message in the value line against the object collection saying:

"In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user."

This is incredibly frustrating, particularly when we have large nested collections of objects.

We are pretty sure this feature was working fine after we upgraded, but we are not so sure that it was working after we applied the VS2005 service pack.

Can anyone suggest any ideas that might help to solve this issue, as it is a massive hinderance to our productivity and our office swear box has been raking it in!!!

Cheers

[1068 byte] By [Yibbler] at [2008-1-9]
# 1

Hi Yibbler,

Sorry for your fustrations. Can you tell me what language you are using?

Thank you,

Liz

Liz-MSFT at 2007-10-3 > top of Msdn Tech,Visual Basic,Visual Basic IDE...
# 2

Hi Liz

Thanks for your reply. We use VB. We have 17 projects inside one solution, one of which is a setup project. Are there debugging settings in VS which would cause this?

Presumably, someone at Microsoft programmed the Quickwatch window to say this...there must be a valid reason, I just cannot find what it is!!!

Thanks

Yibbler

Yibbler at 2007-10-3 > top of Msdn Tech,Visual Basic,Visual Basic IDE...
# 3
Did anyone find a solution to this? We are having exactly the same issue:

I am using VB .net 2.0 with VS 2005 to debug a dll used to provision objects with the MIIS server.

When I bring up the QuickWatch window. the debugger can't seem to enumerate many collections. Instead I get:

"In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user." The "user" here is the debugger, isn't it?

Am I missing something?

Pretty frustrating.

alatmcc at 2007-10-3 > top of Msdn Tech,Visual Basic,Visual Basic IDE...
# 4

I've moved this thread into the VB forum. The VB team monitors this forum and they are the ones who are providing this error message.

Cheers,

John

JohnCunningham-MSFT at 2007-10-3 > top of Msdn Tech,Visual Basic,Visual Basic IDE...
# 5
Thanks, John,

It is related to VB, because the debugger works fine with the same objects in C#.

The object is a "Microsoft.MetadirectoryServices.CsEntry"

I am working with MIIS 2003 SP2 on Win2K3R2 and VB. Net 2.0 and C#. Net 2.0 with VStudio 2005. MIIS, dll's, source and VStudio are on the same machine if that helps.

I am working on an extensible management agent extension for MIIS in C#. But my provisioning code is all in VB.

I can drill down through all of the objects nicely in C#, but the VB code can't see inside the CSEntry collections

Perhaps I have to install some debugging support for the MIIS server assemblies?

alatmcc at 2007-10-3 > top of Msdn Tech,Visual Basic,Visual Basic IDE...
# 6
Just one possible suggestion: To to Tools.Options.Debugging, and under "Enable Just My Code", make sure that "Show all members for non-user objects in variables windows (Visual Basic)" is checked. (If Enable Just My Code is unchecked, you mya have to check it in order to check the sub-option, then you can uncheck it again.) That will make sure you can drill into private fields, although I'm not sure if that's your problem.
StephenWeatherfordMS at 2007-10-3 > top of Msdn Tech,Visual Basic,Visual Basic IDE...
# 7

Hi guys,

This doesn't sound like the desired behavior for this scenario. The way we could best diagnose this issue is if someone could file a bug to our product feedback center at http://connect.microsoft.com/site/sitehome.aspx?SiteID=210 and include some sort of example that demonstrates the problem. Anything that narrows it down is helpful. Failing that, we could use more detail about what specific kind of collection you are using, where it is defined, etc.

Thanks!

WHorst_MS at 2007-10-3 > top of Msdn Tech,Visual Basic,Visual Basic IDE...
# 8

Hi,

Has this issue been resolved? It's difficult to debug when you can't see the collections changing. Is there a workaround?

Thanks,

Tracy

TracyBoland at 2007-10-3 > top of Msdn Tech,Visual Basic,Visual Basic IDE...
# 9

Yibbler,

This behavior is common for object collections. You have a couple options:

Use the Immediate Window to query to object. I talk about this on my blog:

http://www.platinumbay.com/blogs/dotneticated/archive/2007/09/02/visual-studio-immediate-window-debugging.aspx

You can also write a debugger visualizer for custom objects. David Hayden talks about it over here:

http://davidhayden.com/blog/dave/archive/2005/12/26/2645.aspx

Hope this helps,

Steve - dotneticated.com

.NETicated! at 2007-10-3 > top of Msdn Tech,Visual Basic,Visual Basic IDE...