File: n_pbdebug.sru
Size: 2292
Date: Fri, 09 Aug 2019 15:56:10 +0200
$PBExportHeader$n_pbdebug.sru
forward
global type n_pbdebug from nonvisualobject
end type
end forward

global type n_pbdebug from nonvisualobject autoinstantiate
end type

type prototypes
Function long rt_dbg_on() &
   Library "pbvm105.dll"

Function long rt_dbg_off() &
   Library "pbvm105.dll"

Function long rt_dbg_set(long option) &
   Library "pbvm105.dll"

Function long rt_dbg_del(long option) &
   Library "pbvm105.dll"

Function long rt_dbg_outfile(string filename) &
   Library "pbvm105.dll"

end prototypes
type variables
// Options
// 01 - Display console
// 03 - Show memory related calls
// 20 - Show internal calls
// 21 - PBL management - by itself, doesn't create log
// 23 - Show internal calls
// 26 - Show internal calls
// 27 - Function pointer loading, structure pointer assigns
// 29 - Object group processing
// 30 - Show function/event calls
// 32 - Show external func calls
// 34 - Show pcode line execution
// 38 - Event queue processing
// 42 - Show internal calls
// 43 - Global symbol references dump
// 44 - Class ref
// 45 - Routine symbol table dump

end variables

forward prototypes
public subroutine of_debug_on ()
public subroutine of_debug_off ()
public subroutine of_option_on (long al_option)
public subroutine of_option_off (long al_option)
public subroutine of_logfilename (string as_filename)
end prototypes

public subroutine of_debug_on ();Long ll_rtn

// turn debugging on
ll_rtn = rt_dbg_on()

end subroutine

public subroutine of_debug_off ();Long ll_rtn

// turn off console display
of_option_off(1)

// turn debugging off
ll_rtn = rt_dbg_off()

end subroutine

public subroutine of_option_on (long al_option);Long ll_rtn

// turn debugging option on
ll_rtn = rt_dbg_set(al_option)

end subroutine

public subroutine of_option_off (long al_option);Long ll_rtn

// turn debugging option off
ll_rtn = rt_dbg_del(al_option)

end subroutine

public subroutine of_logfilename (string as_filename);Long ll_rtn

// set the logfile name
ll_rtn = rt_dbg_outfile(as_filename)

end subroutine

on n_pbdebug.create
call super::create
TriggerEvent( this, "constructor" )
end on

on n_pbdebug.destroy
TriggerEvent( this, "destructor" )
call super::destroy
end on