Debug.WriteLine not working

前端 未结 13 1960
梦毁少年i
梦毁少年i 2020-12-03 03:07

In the past, perhaps versions of Visual Studio prior to the 2008 that I am using now, I would do something like this in my VB.NET code:

System.Diagnostics.De         


        
13条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-03 03:24

    I had a similar issue with Visual Studio 2013 and MS unit testing. Right clicking on a unit test method and selecting Run Tests any Debug.WriteLine calls would not show up in either the immediate window or the debug output window. Even though the library I was testing and the unit test project itself both had DEBUG conditional checked in the build section of there project properties.

    In order for the Debug.WriteLine statements to output anything I needed to run the unit tests by right clicking and selecting Debug Tests. Only then did I get the debug output being written to the debug output window.

提交回复
热议问题