Thread: OutputDebugString not working in Visual Studio 2008

  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    65

    OutputDebugString not working in Visual Studio 2008

    I have a Windows Forms app and print a message using OutputDebugString() whenever a button is pressed. However I don't see any output in the output or immediate window in Visual Studio. Stepping through the program shows OutputDebugString() is executed. I tested OutputDebugString() in a regular console app and it worked, so what could be the problem?

  2. #2
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Make sure it is going to the output window and not the immediate window. In 2005 there was a setting to make all output go to the immediate window or the output window. Not sure about 2008.

  3. #3
    Registered User
    Join Date
    Jan 2008
    Posts
    65
    When I tested it on a console app OutputDebugString() went to output (not immediate). However, I have both windows open so I should see it being printed since it either goes to one or the other (for the Windows Forms app).

  4. #4

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. New to Visual Studio 2008
    By bargomer in forum C++ Programming
    Replies: 5
    Last Post: 09-19-2008, 02:16 PM
  2. Problem Compiling Program
    By wco5002 in forum C++ Programming
    Replies: 13
    Last Post: 11-06-2007, 12:56 PM
  3. visual studio 6 and visual studio.net difference
    By gemini_shooter in forum Tech Board
    Replies: 5
    Last Post: 02-04-2006, 01:32 AM
  4. ras.h errors
    By Trent_Easton in forum Windows Programming
    Replies: 8
    Last Post: 07-15-2005, 10:52 PM
  5. Using 'if' with char arrays or string objects
    By c++_n00b in forum C++ Programming
    Replies: 36
    Last Post: 06-06-2002, 09:04 PM