Debug dot What ???


So I was coding away in VB.NET 2005, and went to add a Debug.WriteLine statement. 

So I typed Debug.  and looked at the intellisense window….

And my first reaction was where’s WriteLine, surely that WriteLine should be in the “Common” list, not only in the “All” list


Of course, I didn’t really look at the two items that were in the common list … i wanted WriteLine and it wasn’t there….


But then …. like a beam of sunlight breaking through … I saw it… 


Was it an illusion?  I could not be sure. I had to be sure….


No, nope illusion, there it is in the actual System.Diagnostics.Debug class in all it’s glory ….


What’s that, you still don’t know what I am talking about ??


Well you need to crack open Vb.NET 2005 and try the Debug dot enlightenment thang


6 Comments so far

  1.   Geoff Appleby on May 8th, 2005          

    w00t!!! It’s back it’s back it’s back!!! *dances*

    It’s strange how they’d bring something like that back in, having decided to get rid of it in the first place…maybe they needed it to get default form instances working *grin*

  2.   Bill McCarthy on May 10th, 2005          

    LOL ! Geoff, that’s just cruel

    Seriously though this rocks ! And it’s actually done by the framework team !!

    i’ve swapped back to my old ways already smile

  3.   David M. Kean on May 13th, 2005          

    I seriously can’t believe that they added to the framework.

    I can just imagine the questions by newbies now, what’s the different between Print and Writeline?

    Do they seriously think that VB6 programmers are that stupid that they can’t learn a different way of doing things?

  4.   Bill McCarthy on May 13th, 2005          

    Hey David,

    thought’d you love it smile

    Nice thing is it’s less to type, only 5 chars instead of 9 !!

    You are right however it may cause some confussion, so hopefully over time they’ll deprecate WriteLine as it’s now obsolete. That’d be pretty cool when you think about it, you’d just have Print and Write, so with the aid of intellisense automatic word completeion you’d be down to only having to type either p or w. Rocks hey !!!

    Oh and the nicest thing is it’s based on observing prior art

  5.   Daniel Moth on May 16th, 2005          

    Waste of metadata in my view. It is features like this that make me shake my head in disappointment. Not trying to start anything here… just stating my opinion…

    [kinda surprised you are so happy about it though…]

  6.   Bill McCarthy on May 16th, 2005          

    hey Daniel,

    hey I think overloads waste a LOT more metadata <bg>

    The thing to remember is what the class is for. That is look at things in perspective. This is not meant to be of significance at runtime, instead it’s something to assist developers when debugging. So if Debug.Print is more natural to a lot of people then more power to them. if it makes it easier for them to switch between Vb6 and VB.NET even more so better. It doesn’t mess with the state of anything, it doesn’t make any object more unstable or overly complex, and it doesn’t even really (or shouldn’t) exist in released code anyway, only in Debug builds.

    So it’s a developer preference thing.

    If we want to dictate what that needs to look at, I think we could do a lot better by standardising what people use for naming conventions for private fields first

    Seriously, this is empowering people at no expense to others. Let’s be happy for those who want to use it (and yes that does include me. After years of WriteLine I’ll happily take Print anyday smile