Console.WriteLine 不输出到 VS 2017 中的输出 Window
Console.WriteLine does not output to Output Window in VS 2017
简而言之:Console.WriteLine 在 VS 2015 中工作正常,但在 VS 2017 中不再工作。
详细说明:我有一些使用 Console.Write 的 VB 代码输出 ok 到 VS 2015 中的输出 Window,即使配置为 Release (与 Debug 对比)启动时也是如此开始调试(与 Start Without Debugging 对比)。
今天我升级到 VS 2017(社区版),但是 Console.Write 在与 VS 2015 相同的条件下不再工作。
可能我以前在VS 2015里做过一些配置,但我不记得了。
有人可以帮助我如何在相同条件下将 Console.Write 输出到输出 Window(发布配置随启动调试一起启动)。
观察:当您处于调试配置时,Debug.Writeline 工作正常(输出到输出 Window)。当您处于 Release 配置中时,Debug.Writeline 不会输出(到输出 Window),即使您使用 Start Debugging 启动也是如此。需要(以及问题)是在发布配置中开始调试的上下文中。
VS 2017(社区)没有 VS 2015 中的 "Hosting Process"。
在 VS 2015 中,可以在项目属性的调试面板中启用 "Hosting Process"。
使用 "Hosting Process" 可以使用 Console.WriteLine() 输出到输出 Window(当使用 Start Debugging 启动发布配置时)。
在 VS 2017 中没有这样的启用程序,因此 Console.WriteLine() 不再输出到输出 Window。
发现 (System.Diagnostics.)Trace.WriteLine(Format(...)) 在 Release configs 中输出到 Output Window 并且可以替换 (System.)Console.WriteLine.
简而言之:Console.WriteLine 在 VS 2015 中工作正常,但在 VS 2017 中不再工作。
详细说明:我有一些使用 Console.Write 的 VB 代码输出 ok 到 VS 2015 中的输出 Window,即使配置为 Release (与 Debug 对比)启动时也是如此开始调试(与 Start Without Debugging 对比)。
今天我升级到 VS 2017(社区版),但是 Console.Write 在与 VS 2015 相同的条件下不再工作。
可能我以前在VS 2015里做过一些配置,但我不记得了。
有人可以帮助我如何在相同条件下将 Console.Write 输出到输出 Window(发布配置随启动调试一起启动)。
观察:当您处于调试配置时,Debug.Writeline 工作正常(输出到输出 Window)。当您处于 Release 配置中时,Debug.Writeline 不会输出(到输出 Window),即使您使用 Start Debugging 启动也是如此。需要(以及问题)是在发布配置中开始调试的上下文中。
VS 2017(社区)没有 VS 2015 中的 "Hosting Process"。 在 VS 2015 中,可以在项目属性的调试面板中启用 "Hosting Process"。 使用 "Hosting Process" 可以使用 Console.WriteLine() 输出到输出 Window(当使用 Start Debugging 启动发布配置时)。 在 VS 2017 中没有这样的启用程序,因此 Console.WriteLine() 不再输出到输出 Window。
发现 (System.Diagnostics.)Trace.WriteLine(Format(...)) 在 Release configs 中输出到 Output Window 并且可以替换 (System.)Console.WriteLine.