1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

DebugMonitor - More mystical than magnets?

Discussion in 'Support' started by JRohde, May 24, 2012.

  1. JRohde

    Joined:
    Sep 1, 2008
    Messages:
    21
    Likes Received:
    0
    OK. I'm stumped. I had assumed from the name and (currently) sparse documentation that DebugMonitor was basically a command line version of DebugView's basic functionality. Basically a 'tail /f' for the reading the OutputDebugString() API.

    Could I get a little help? I can't quiet intuit the usage or what it's for. It seems to let me register or clear commands. Maybe those commands get run with stdin set to the outputdebugstring content? Once I realized I didn't know what was going on, I didn't want to gen any debug string info as I really wasn't sure what would happen.
     
  2. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,179
    Likes Received:
    11
    I see the _OutputDebugString variable getting set properly. However, I think the function does not execute as it is documented.
    For instance, what is the condition that gets triggered?

    DEBUGMONITOR n command​

    n Number of repetitions (or FOREVER)​
    command
    Command to execute when condition is triggered
     
  3. JRohde

    Joined:
    Sep 1, 2008
    Messages:
    21
    Likes Received:
    0
    Ya know - lame as it may be, I think what I really want is a device 'DBG:' that is like 'clip:' except reading reads the debugoutputstring data (typically blocking), and writing to it generates OutputDebugString() calls. Then I could just use it with tail/f and whatever other tools I'm used to.
     
  4. Joe Caverly

    Joined:
    Aug 28, 2009
    Messages:
    639
    Likes Received:
    7
    Hi,
    I am using;

    Code:
    TCC  14.00.16  Windows XP [Version 5.1.2600]
    TCC Build 16  Windows XP Build 2600  Service Pack 3
    I wrote a test program in PowerBASIC, TEST.EXE, thus;

    Code:
    #COMPILE EXE
    #DIM ALL
    #INCLUDE "WIN32API.INC"
     
    FUNCTION PBMAIN () AS LONG
      OutputDebugString("JLC")
    END FUNCTION
    If I do,

    Code:
    debugmonitor FOREVER msgbox OK TCC
    then execute,

    Code:
    test.exe & echo %_outputdebugstring
    I get;

    Code:
    JLC
    but the msgbox does not display. I really do not need any command to execute when the condition is triggered, though, so in my case the msgbox is just filler.

    I used to use the DBWin32.exe program to monitor OutputDebugString(), and may still use it, but Debugmonitor seems to eliminate the need for that program now.

    Joe
     
  5. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,732
    Likes Received:
    81
    There's a typo in the DEBUGMONITOR code, so it wasn't setting the flag that would enable executing the specified command. (But _outputdebugstring *was* being set correctly.)

    It's been fixed for build 17.
     
  6. JRohde

    Joined:
    Sep 1, 2008
    Messages:
    21
    Likes Received:
    0
    Hi Rex - sorry to keep bugging you. Is there a way I would use DebugMonitor in a 'tail /f' scenario where I just want to block and dump the channel? I'm assuming it I just tied to to 'echo' it would be async and dumping info in the middle of my session?

    I feel like I'm just not 'getting it'.
     
  7. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,732
    Likes Received:
    81
    Start a new session (tab window). You'll get the same results if you're blocking in one window, versus non-blocking in two but the second one is only displaying DEBUGMONITOR output.
     

Share This Page