Results 1 to 5 of 5

Thread: Hide private variables.

  1. #1

    Thread Starter
    PowerPoster VBDT's Avatar
    Join Date
    Sep 2005
    Location
    CA - USA
    Posts
    2,922

    Hide private variables.

    Hi everyone,
    This might be an easy question but it seems I can’t find the answer.
    Does any one know how can I set the private variables to be hidden in the debug popup window? For example I want to see only the properties of my class but not the private variables see the image. Thanks in advance!
    Attached Images Attached Images  

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Hide private variables.

    It may not be possible because it makes sense that the debugger shows field values, but if it is possible then I'm sure that it would involve applying an attribute to the field declaration. If I was trying to achieve this I'd go to the MSDN documentation for the Attribute class, click the link for the list of derived classes and then look down the list to see if anything has a name that suggests that it's used for that purpose. That's what I have always done if I want to modify design time/debugging behaviour.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    PowerPoster VBDT's Avatar
    Join Date
    Sep 2005
    Location
    CA - USA
    Posts
    2,922

    Re: Hide private variables.

    Quote Originally Posted by jmcilhinney
    It may not be possible because it makes sense that the debugger shows field values, but if it is possible then I'm sure that it would involve applying an attribute to the field declaration. If I was trying to achieve this I'd go to the MSDN documentation for the Attribute class, click the link for the list of derived classes and then look down the list to see if anything has a name that suggests that it's used for that purpose. That's what I have always done if I want to modify design time/debugging behaviour.
    Hi jmcilhinney! Thanks for the suggestion but I’ve already done that and didn’t see any thing close to the solution. I even used my vb advanced book and all it talks is about Property and method attributes. No indication what so ever about member variables. Anyway thanks again.

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339

    Re: Hide private variables.

    Why would you want to do this?

  5. #5

    Thread Starter
    PowerPoster VBDT's Avatar
    Join Date
    Sep 2005
    Location
    CA - USA
    Posts
    2,922

    Re: Hide private variables.

    It isn’t a big deal but when I have bunch of private variables and public properties it is getting messy to check the values in debug time. I don’t see any class private variables when I use some .Net classes so I though It is possible to do it the same.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width