write to debug window?

Discussion in 'C++' started by marane moll, Jul 24, 2003.

  1. marane moll

    marane moll Guest

    Hello.
    How do I write to the debug window in "Visual c++" in a windows application?

    Thankyou
    Sincerely
    Marane
    marane moll, Jul 24, 2003
    #1
    1. Advertising

  2. marane moll wrote:
    > Hello.
    > How do I write to the debug window in "Visual c++" in a windows application?


    OutputDebugString

    --
    "Codito ergo sum"
    Roel Schroeven
    Roel Schroeven, Jul 24, 2003
    #2
    1. Advertising

  3. "marane moll" <> wrote in message
    news:bfoiqh$2on$03$-online.com...

    > How do I write to the debug window in "Visual c++" in a windows

    application?

    This question should belong into a newsgroup about Visual C++, since it
    is no C++ Language question. But oh well, you'll know for next time, right?
    ;o) The answer to your question: Use OutputDebugString ("hello world\n");

    hth
    --
    jb

    (replace y with x if you want to reply by e-mail)
    Jakob Bieling, Jul 24, 2003
    #3
  4. marane moll

    Alan Chen Guest

    "Jakob Bieling" <> wrote in message news:<bfojv2$ner$00$-online.com>...
    > "marane moll" <> wrote in message
    > news:bfoiqh$2on$03$-online.com...
    >
    > > How do I write to the debug window in "Visual c++" in a windows

    > application?
    >
    > This question should belong into a newsgroup about Visual C++, since it
    > is no C++ Language question. But oh well, you'll know for next time, right?
    > ;o) The answer to your question: Use OutputDebugString ("hello world\n");
    >
    > hth


    And if you want to know how to interface this function with C++
    iostreams, you might want to look at:

    http://www.respower.com/~earlye/programming/19991206.001.htm
    Alan Chen, Jul 25, 2003
    #4
  5. marane moll

    Phlip Guest

    > > > How do I write to the debug window in "Visual c++" in a windows
    > > application?
    > >
    > > This question should belong into a newsgroup about Visual C++, since

    it
    > > is no C++ Language question. But oh well, you'll know for next time,

    right?
    > > ;o) The answer to your question: Use OutputDebugString ("hello

    world\n");
    > >
    > > hth

    >
    > And if you want to know how to interface this function with C++
    > iostreams, you might want to look at:
    >
    > http://www.respower.com/~earlye/programming/19991206.001.htm


    I have wrapped up a great many of my best tricks regarding the VC++ Output
    Panel here:

    http://www.c2.com/cgi/wiki?VisualCeePlusPlus

    It includes the iostreams wrapper from here:

    http://www.codeproject.com/debug/debugout.asp

    That provides an implementation of #define db(x) that prints the file name,
    line number, name of x and value of x to that panel, in VC++ diagnostic
    format. This means you can tap <F4> to navigate to the next db() trace
    statement.

    My source then goes on to provide a lite test rig.

    --
    Phlip
    http://www.c2.com/cgi/wiki?TestFirstUserInterfaces
    Phlip, Jul 25, 2003
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. RonL
    Replies:
    0
    Views:
    731
  2. ringos75
    Replies:
    0
    Views:
    941
    ringos75
    Apr 14, 2005
  3. Mike C. Fletcher
    Replies:
    3
    Views:
    970
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Oct 12, 2003
  4. André
    Replies:
    3
    Views:
    1,562
  5. orion30
    Replies:
    2
    Views:
    103
    Thomas 'PointedEars' Lahn
    May 25, 2005
Loading...

Share This Page