0

Our ASP.NET C# web application is used in the following environment

  • .NET Framework 4
  • IIS 7
  • Windows 2008
  • Visual Studio 2012
  • C# - HTTPS ( SSL )
  • IIS Express

The System.Diagnostics.Debug.WriteLine fails to write to the Visual Studio 2012 output window.

I have run the Web Applicaiton debug mode, and I checked "Define DEBUG constant" and checked "Define TRACE constant"

Please mention that steps that I need to take in order to see debug statements in Visual Studio 2012 output window.

Update: I am using IIS Express. That might complicates stuff. Does it?

crazyTech
  • 1,379
  • 3
  • 32
  • 67
  • 1
    Did you check the "Immediate Window"? – Kirk Woll Nov 08 '13 at 22:46
  • Well, OK, you're checking Output window, the default listener for debug info... But what about drop-down on top of this window? Did you select there to show "Debug" output? And, just to ask... If you set breakpoint on "WriteLine", is it hit? – Dmytro Nov 08 '13 at 22:54
  • @Dmitriy Yes, it hits the WriteLine. Yes, "Debug" in dropdown is selected. Also, I ensured Unchecked "Redirect all Output Window text to the Immediate Window" – crazyTech Nov 08 '13 at 23:12
  • Are you sure the value isn't getting lost somehwere? Select all text and copy it out to notepad and search for a sample. – P.Brian.Mackey Nov 08 '13 at 23:14
  • I see a lot of The thread 'Win32 Thread' (0x1160) has exited with code 0 (0x0). The thread 'Win32 Thread' (0x178c) has exited with code 0 (0x0). The thread 'Win32 Thread' (0x2148) has exited with code 0 (0x0). – crazyTech Nov 08 '13 at 23:29
  • @user1338998 Sounds like we're missing something pretty basic... Can you check following: set breakpoint on WriteLine. Start Debugging. Hit breakpoint - and press F10 to move to next command in debugging session. Exactly now, will there be any message in Output window, debug tab? And, additionally, if you will select "Watch" over Debug class, and check Listeners collection, will there be any? By default, there must be at least DefaultTraceListener. Finally, you can install package like Glimpse - it might greatly simplify your debug/trace sessions like this in future. – Dmytro Nov 08 '13 at 23:44

0 Answers0