Results 1 to 5 of 5

Thread: Clear up the debug?

  1. #1
    Join Date
    Sep 2014
    Posts
    447
    Mentioned
    10 Post(s)
    Quoted
    203 Post(s)

    Default Clear up the debug?

    I have been working on a small script over the weekend, and I have finally worked most of the kinks out with the normal code, but I'm greedy now and I would like a nice clear debug/console box. The most spammy output so far is:

    Current mouse-over text: ""
    Current mouse-over text: ""
    Current mouse-over text: ""
    -- isMouseOverText(): False
    -- isMouseOverText()

    I have no idea how to search this question so I couldnt find a better solution in the forums

    All help is appreciated!

  2. #2
    Join Date
    Aug 2008
    Location
    Oklahoma, USA
    Posts
    173
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    DisableSRLDebug := true;

  3. #3
    Join Date
    Mar 2013
    Location
    Argentina
    Posts
    758
    Mentioned
    27 Post(s)
    Quoted
    365 Post(s)

    Default

    Quote Originally Posted by yourule97 View Post
    Stuff
    Quote Originally Posted by sf411 View Post
    DisableSRLDebug := true;
    this that sf411 said will disable the debug and print only the stuff you have put "writeln("...")" .
    Although, There is another way of managing the debug and it works like this:

    you must put:
    Code:
    {$define debug_on}
    On the top of the script with all those other RED stuff.

    Then you must do This with each thing you want on or off the debug: (Painted in RED)

    Code:
    procedure Warning(text:string);
    begin
    {$IFDEF debug_on}
    writeln('=========================');
    writeLn('Stuff that gets printed on the debug');
    writeln('=========================');
    {$ENDIF}
    end;
    This will probably come in handy to you also

    Code:
    clearDebug();
    That clears completly the debug. (comes in handy when printing ProgressReports)

    Hope i have been able to help you, Undorak7

  4. #4
    Join Date
    Sep 2014
    Posts
    447
    Mentioned
    10 Post(s)
    Quoted
    203 Post(s)

    Default

    Thanks to you both!

  5. #5
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    What i always do
    Simba Code:
    Const
      DEBUG_MODE = false;

    procedure Debug(msg: String);
    begin
      if DEBUG_MODE then
        writeln(msg);
    end;
    So whenever i want to print something trivial i call Debug(), and simply set DEBUG_MODE to true when debugging.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •