Where is the result of System.Diagnostics.Debug.WriteLine? Are there any better solutions for outputting results with Debug? Maybe something similar to the work of NSLog in objective-c

    1 answer 1

    In the debugger, of course.

    If you run the application without a debugger (why?), You can configure it so that the log is dropped to the console or to a file. Example (stolen from here , add to app.config ):

     <configuration> ... <system.diagnostics> <trace autoflush="true"> <listeners> <add name="TestTrace" type="System.Diagnostics.TextWriterTraceListener" initializeData="trace.txt" /> </listeners> </trace> </system.diagnostics> ... </configuration> 
    • one
      A more general answer: output results are displayed in connected listeners. In particular, the debugger is one of the listeners. If there is no debugger, then you can connect the output to a file. - andreycha
    • @andreycha: there is a DebugView on the desktop (it is registered as a listener). - VladD