12

I am using Visual Studio 2010 Professional in trial mode... and suddenly the Output window won't show my Debug.Write() stuff. It had been showing it for the past month.

I have been using the 2010 version for 30 days (after upgrading from Visual Studio 2003) in trial mode. I just renewed the trial for the extra 60 days, and the "About Visual Studio" window says I still have 59 days left.

I have verified that the application is running properly, without errors. When I purposely generate an error, the Output Window properly shows the error and the stack trace I've already checked my Build>Configuration... it's in "Debug" mode, not "Release". The Debug.Write() text is not going to the Immediate window, either.

One other point, I tried running the same application in the Visual Studio 2010 Express Edition, and it complained that it could not debug the specified code, though it did properly build it so that it would run in the build. Could Visual Studio 2010 Express have modified something in my project files to disable the debugging output? I looked, but I really don't know what to look for.

4

4 回答 4

20

对我来说相同的症状,不同的解决方案:

  1. 工具 -> 选项 -> 调试 -> 常规
  2. 取消选中“将所有输出窗口文本重定向到立即窗口”

在我这样做之后, debug.print() 像以前一样进入了输出窗口。

奇怪的是我从来没有检查过这个选项。我所做的某些事情一定会导致设置发生变化。不知道。

于 2011-08-28T18:20:58.560 回答
3

There could be another reason the debug information is not showing in the Output window or the Immediate window. If your config file removes the default listener the debug information will not show. Comment out the remove default in the listeners section in your app.config file:

<trace autoflush="true" indentsize="4">
  <listeners>
    <!--<remove name="Default" />-->
  </listeners>
</trace>
于 2013-02-21T15:02:26.767 回答
1

我也有关于这个问题的更新,因为我在输出窗口中更改了过滤器设置。您需要在“输出”窗口中单击鼠标右键,然后选择“程序输出”(如果尚未选择)。

在输出窗口中右键单击上下文菜单的屏幕截图

截屏

于 2019-12-06T10:49:33.450 回答
0

请看一下这个其他问题,它为您的问题提供了几个可能的原因:System.Diagnostics.Debug.Write 输出出现在哪里?

我将从检查 DEBUG 标志开始。

于 2011-02-26T18:53:24.660 回答