OutputDebugString in .NET (C#)

Discussion in 'C#' started by shabbir, Nov 29, 2006.

  1. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,376
    Likes Received:
    388
    Trophy Points:
    83
    In my old MFC programming days we used to track the problems using the OutputDebugString and I have written my own version of OutputDebugString which accepts multiple arguments. When I started C# and .NET I wanted to know how can I do this in C sharp as well and remember that it should be as simple as MFC one. At least Microsoft says its more easier to code in .net than any other languages.

    The Code ...


    Code:
    System.Diagnostics.Debug.WriteLine("I am using dot net debugging");
    System.Diagnostics.Trace.WriteLine("I am using dot net tracing");
    
    Remember to Run in Non Debug mode (Ctrl+F5 or Debug/Start Without Debugging) or else VS.NET Output Window will grab the debug output
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice