How can I write output from a unit test?

后端 未结 15 972
误落风尘
误落风尘 2020-11-28 20:56

Any call in my unit tests to either Debug.Write(line) or Console.Write(Line) simply gets skipped over while debugging and the output is never print

15条回答
  •  爱一瞬间的悲伤
    2020-11-28 21:40

    I'm using xUnit so this is what I use:

    Debugger.Log(0, "1", input);
    

    PS: you can use Debugger.Break(); too, so you can see your log in out.

提交回复
热议问题