简体   繁体   中英

Using Debug.WriteLine to write to Output window (VS2012)

I've used a good part of yesterday reading through all the related posts on SO and other online forums to find a solution to this seemingly very straightforward problem that is driving me nuts.

For some reason, I just cannot seem to be able to print anything to the Output window of my Visual Studio 2012 (Ultimate). A quick run-down of what I tried:

  • Put 'Solution Configurations' in debug mode
  • Put 'Show output from' in debug mode
  • Right-click Output window to open a dialog and make sure 'Program Output' is checked. In my case, I have everything checked
  • Tools | Options | Debugging -> 'Redirect all Output Window text to the Immediate Window' is UNchecked
  • Tools | Import and Export Settings -> Reset all settings (just in case I tweaked something unintentionally)

I've tried all of the above and some more to no avail. I mean, I've spent a fair share of my time using a number of widely used IDEs but never had this much difficulty with simply trying to print something in the Output window.

Lastly, it probably doesn't add any value to this post but here's my stupid-simple code:

using System;
using System.Diagnostics;

namespace DataProc.classes
{
    class Program
    {
        static void Main(string[] args)
        {
            Debug.WriteLine("I hate you, silly VS!!!");
        }
    }
}

EDIT: (Adding web.config)

<configuration>
    <system.web>
        <compilation debug="true" targetFramework="4.5" />
        <httpRuntime targetFramework="4.5" />
    </system.web>
</configuration>

Try to reset VS2012 settings to default. You can do it from command line as shown here: Reset VS2102 Settings

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM