SRL Archive - RS3 Help

Clear up the debug?


yourule97

2014-09-14 20:22:52

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!

sf411

2014-09-14 20:24:41

DisableSRLDebug := true;

Lipcot

2014-09-14 21:00:28

From: yourule97
Stuff


From: sf411
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:
[COLOR="#FF0000"]{$define debug_on}[/COLOR]
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)

procedure Warning(text:string);
begin
[COLOR="#FF0000"]{$IFDEF debug_on}[/COLOR]
writeln('=========================');
writeLn('Stuff that gets printed on the debug');
writeln('=========================');
[COLOR="#FF0000"]{$ENDIF}[/COLOR]
end;

This will probably come in handy to you also

clearDebug();

That clears completly the debug. (comes in handy when printing ProgressReports)

Hope i have been able to help you, Undorak7 :norris:

yourule97

2014-09-14 21:33:54

Thanks to you both!

riwu

2014-09-14 21:49:03

What i always do

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.