Debug rules.trace of compiled predicates

iKnow-IT banner

 

  • Compiled predicates can be traced using a combination of the set_detailed_debugging(on) predicate and the trace_it predicate in the prolog code.

Set “set_detailed_debugging(on),” in the ruling just before predicate call.

  • For example, in notify.pro:

assert_notify(_event,_class) :-

trace_it(recorded(notify_list, _class, [_type,_user_name,_user_addr])),

trace_it(recorded(ntfy_event_server,_ntfy_svr)),

(trace_it(_type == 'MAIL'),

trace_it(sprintf(_fmt_str, '-l "T/EC Tasks" -h "%s" -a "%s" -a "%s"',

[_ntfy_svr,_user_name,_user_addr])),

trace_it(exec_task(_event,'Send_Email',_fmt_str,[], 'YES'))

 

 

wrb -comprules -trace <RB>

wrb -loadrb -use <RB>

wstopesvr;wstartesvr