Where does Console.WriteLine go in Debug?

后端 未结 10 2126
后悔当初
后悔当初 2020-12-15 16:23

I found this question, but what I want to know is different - does the output from Console.WriteLine go anywhere when debugging? I know that for it to go to the output windo

10条回答
  •  时光取名叫无心
    2020-12-15 17:09

    As already commented on OP's question:

    No need to write additional code

    In Visual Studio uppermost menu choose

    Debug > Windows > Output

    The output windows will only be visible in debug mode and it will show all e.g. Console.WriteLine("Debug MyVariable: " + MyVariable) when you get to them.

    Set a breakpoint before (click the different-coloured empty area before the line number at the start of a chosen line), debug (F5), and then step through code line by line (F11) until you do.

提交回复
热议问题