Results 1 to 3 of 3

Thread: debug.writeline?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2005
    Posts
    24

    debug.writeline?

    Hi...i'm just wondering what does debug.writeline does in a code?...can anyone explain it?...i've read from msdn but can't seem to understand..anyone can put it in a much simpler format?

  2. #2
    Member basilisk's Avatar
    Join Date
    Jan 2002
    Posts
    32

    Re: debug.writeline?

    Simple answer is that it does the same thing as debug.print in VB6. So for example if you have the following piece of code


    Code:
            
           Dim intInteger As Int16
            intInteger = 42
    
            Debug.WriteLine("value is " & intInteger)
    when you run this in the IDE if you look in the output window you will see 'value is 42' printed out. It can be useful to see what the value of variables etc are in different parts of your program but with the nice tooltips in vb.net its also quite easy to see these values when you step through the program.

    This is the simplest format i could put this in so hope it helps or explains.

  3. #3
    Frenzied Member ntg's Avatar
    Join Date
    Sep 2004
    Posts
    1,449

    Re: debug.writeline?

    basilisk is right. If I may add that you can also use DebugView to watch the output of Debug.WriteLine() statements when you run the code outside the Visual Studio IDE. This works only with debug builds though.
    "Feel the force...read the source..."
    Utilities: POPFileDebugViewProcess ExplorerWiresharkKeePassUltraVNCPic2Ascii
    .Net tools & open source: DotNetNukelog4NetCLRProfiler
    My open source projects: Thales SimulatorEFT CalculatorSystem Info ReporterVSS2SVNIBAN Functions
    Customer quote: "If the server has a RAID array, why should we bother with backups?"
    Programmer quote: "I never comment my code. Something that is hard to write should be impossible to comprehend."
    Ignorant quote: "I have no respect for universities, as they teach not practicle stuff, and charge money for"

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