![](/img/trans.png)
[英]How do I get Debug.WriteLine to write to the output window in Release mode?
[英]Using Debug.WriteLine to write to Output window (VS2012)
昨天我用了很多篇幅來閱讀SO和其他在線論壇上的所有相關帖子,找到解決這個看似非常簡單的問題的方法,這讓我瘋狂。
出於某種原因,我似乎無法在Visual Studio 2012(Ultimate)的“輸出”窗口中打印任何內容。 我試過的快速破壞:
我已經嘗試了上述所有內容以及其他一些無效的內容。 我的意思是,我花了很多時間使用了許多廣泛使用的IDE,但是在簡單地嘗試在“輸出”窗口中打印某些內容時從未遇到過這么大的困難。
最后,它可能不會給這篇文章增加任何價值,但這里是我的愚蠢的簡單代碼:
using System;
using System.Diagnostics;
namespace DataProc.classes
{
class Program
{
static void Main(string[] args)
{
Debug.WriteLine("I hate you, silly VS!!!");
}
}
}
編輯:(添加web.config)
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
</configuration>
嘗試將VS2012設置重置為默認值。 您可以從命令行執行此操作,如下所示: 重置VS2102設置
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.