为什么我的Debug.Write破了? [英] Why is my Debug.Write broken?

查看:121
本文介绍了为什么我的Debug.Write破了?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以解释为什么我的Debug.Write停止工作没有明显的原因 - 没有输出可见?这在Visual Studio 2008(从来没有在2005年)在Windows XP,Windows 2003 Server和Windows 7上发生了很多次。



这是每项目和在同一时间(在Windows 2003服务器上),我有Debug.Write工程不工作的项目。



目前,在Windows 7上,我根本没有调试输出。我创建一个新的窗体窗体项目,将Debug.Write(bla)放在Form_Load中,运行它,在输出窗口中没有任何反应。相同的行为在vb.net和c#项目中。



更新:我刚刚发现我的调试输出正在显示,但在我的立即窗口,而不是输出。为什么?



更新:在Visual Studio选项中,调试 - 常规:将所有输出窗口文本重定向到立即窗口中的一个设置。



为什么默认情况下检查,我不知道...

解决方案

工具>选项>调试,常规有一个设置,将所有输出重定向到立即窗口。


Can somebody explain why my Debug.Write stops working for no apparent reason - no output is visible? This has happened to me many times in Visual Studio 2008 (never on 2005), on both Windows XP, Windows 2003 Server and Windows 7.

It is per project and at the same time (on Windows 2003 server), I have projects where Debug.Write works and does not work.

Currently, on Windows 7 I have no debug output at all. I create a new windows forms project, put Debug.Write("bla") in Form_Load run it, and nothing happens in Output window. Same behaviour is in both vb.net and c# projects.

UPDATE: I just found out that my debug output is being shown, but in my Immediate window, instead of output. Why???

UPDATE: In Visual Studio options, there is a setting under Debugging - General: Redirect all Output window text to Immediate window.

Why was this checked by default, I have no idea...

解决方案

Tools > Options > Debugging, General has a setting that redirects all output to the immediate window.

这篇关于为什么我的Debug.Write破了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆