473,386 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Locating A Control's Variables In v2005 Debugger

Hi,

Is there a resource that lists where a control's variables are put?
VC puts data such as a ListView's Items in fields that bear no
resemblance to the programmer's view. After documenting
them for V2003 I am in the same boat with V2005. MS has
done an even better job of hiding them in V2005.

Also, my V2005 does not always show a variable's class. For
example, a TreeNode will only show its text value. Digging
down a few levels will usually expose the class name but that
is distracting and annoying. Is this inherent or is there a fix?

Thanks,
Gary
May 10 '06 #1
3 1204
Gary,

What you see in the debugger is a representation of the class. For
example, the TreeNode is an object, not a string, and that single line is
the best representation that they feel they can give you (which, btw, is
totally configurable).

If you want more values from the class, you have no choice but to dig.

VS.NET 2005 should be ^better^ at displaying this, as it cleaned up a
good deal of what is revealed in the watch window. However, it still has
the raw view, which is everything that it offers. What I don't get is your
comment about bearing no resemblance to the programmer's view. Basically,
you can see the properties that are exposed through the class. What else
are you expecting to see?

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Gary Brown" <ga********@charter.net> wrote in message
news:OC**************@TK2MSFTNGP02.phx.gbl...
Hi,

Is there a resource that lists where a control's variables are put?
VC puts data such as a ListView's Items in fields that bear no
resemblance to the programmer's view. After documenting
them for V2003 I am in the same boat with V2005. MS has
done an even better job of hiding them in V2005.

Also, my V2005 does not always show a variable's class. For
example, a TreeNode will only show its text value. Digging
down a few levels will usually expose the class name but that
is distracting and annoying. Is this inherent or is there a fix?

Thanks,
Gary

May 10 '06 #2
>> Is there a resource that lists where a control's variables are put?
VC puts data such as a ListView's Items in fields that bear no

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in What I don't get is your
comment about bearing no resemblance to the programmer's view. Basically,
you can see the properties that are exposed through the class.


To clarify, what I meant as the "programmer's view" is, for a ListView
for example, a property named "Items" an object that is noted as
an ListViewItemCollection with an array of items in it. What I get is
a puzzle that ultimately leads to the information I want. And if I don't
write
down how I got there will need to repeat the process next time.
Hence the request for some documentation, probably notes by
another programmer, on where the array of ListViewItems is stored.
Ditto subitems, TreeNodes, and so on.

I hope I'm not sounding picky or contentious - just looking to save some
time and effort by not repeating the process I already went through for
VS2003.

Thanks,
Gary
May 10 '06 #3

"Gary Brown" <ga********@charter.net> wrote in message
news:%2******************@TK2MSFTNGP05.phx.gbl...
Is there a resource that lists where a control's variables are put?
VC puts data such as a ListView's Items in fields that bear no


"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in
What I don't get is your
comment about bearing no resemblance to the programmer's view.
Basically, you can see the properties that are exposed through the class.


To clarify, what I meant as the "programmer's view" is, for a ListView
for example, a property named "Items" an object that is noted as
an ListViewItemCollection with an array of items in it. What I get is
a puzzle that ultimately leads to the information I want. And if I don't
write
down how I got there will need to repeat the process next time.
Hence the request for some documentation, probably notes by
another programmer, on where the array of ListViewItems is stored.
Ditto subitems, TreeNodes, and so on.

I hope I'm not sounding picky or contentious - just looking to save some
time and effort by not repeating the process I already went through for
VS2003.


But you are asking MS to effectively lock down the implementation of a class
and even the names of private fields!

In 2.0 MS have tidied up the debug view quite a lot by using some new
attributes to control what is seen in the debugger but I know what you mean.
I have played around with these attributes myself and I have found that the
problem is that what you want to show depends on what level you are
debugging at.

One "solution" is to create a static method:
public static ListViewItem[] ListViewToArray(ListView lv) { return
(ListViewItem[])new ArrayList(lv.Items).ToArray(typeof(ListViewItem)); }

You can then display this in the Watch window (or just the and it will
always work whatever MS does to the internals (Although you have to click
the update icon to get it to update)
May 11 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John H. | last post by:
I installed the Microsoft Script Debugger and set the "Enable Script Debug" flag on in IIS. Also, I made sure that the "Disable Script Debug" flag was off in Internet Explorer. Everything ran...
2
by: David Ibc | last post by:
Hi, I am having trouble setting class and session variables in the Page_Load function in C#. No matter what I set the variables to in Page_Load they are null when I try to access them in other...
6
by: Nick Stansbury | last post by:
Hi, I have a loop running on Page_PreRender that sets a number of controls to invisible based on a set of criteria. Before I do this however, I set all of the drop down lists to be visible with...
4
by: UJ | last post by:
I've got a user control with a drop down list of stuff. I want to have it so that when the user changes the value in the list, it will show up in a label on the main portion of the page. I can't...
5
by: Norsoft | last post by:
I have a .Net 1.1 application which is downloaded into an aspx page. It is a dll which inherits from System.Windows.Forms.UserControl. It works fine on a PC with only the 1.1 Framework. However,...
1
by: Shiraz | last post by:
Hi It seems like none of the old posts get any follow up after a few messages, whether or not something constructive comes out of them, so I'm left with no choice but to repost an earlier...
7
by: zeecanvas | last post by:
Hi, First of all: Yes, I know global variables are bad, but I've a huge amount of legacy code, and I've to maintain it _as_is_. I'm maintaining a big program. I moved all (program-wide scope)...
1
by: Prabakar Samiyappan | last post by:
I am very new to V2005 .and now i have stared a new project in that anybody who have experianced plz give me some suggestion /rules to be followed while doing a asp.net project in V2005 Regards...
10
by: =?Utf-8?B?amM=?= | last post by:
Hello, I am able to successfully compile/link/and execute my v2005 applications using v2008 (after the v2008 automatically converts the v2005 configurations settings). I created a "generic"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.