111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
;; load the ~/.megatestrc file, put (use trace)(trace-call-sites #t)(trace function-you-want-to-trace) in this file
;;
(let ((debugcontrolf (conc (get-environment-variable "HOME") "/.megatestrc")))
(if (common:file-exists? debugcontrolf)
(begin
;; for some reason, debug:print does not work here. Had to use print.
(print (conc "WARNING: loading " debugcontrolf))
(load debugcontrolf)
)
)
)
;; usage logging, careful with this, it is not designed to deal with all real world challenges!
;;
|
>
>
|
|
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
;; load the ~/.megatestrc file, put (use trace)(trace-call-sites #t)(trace function-you-want-to-trace) in this file
;;
(let ((debugcontrolf (conc (get-environment-variable "HOME") "/.megatestrc")))
(if (common:file-exists? debugcontrolf)
(begin
;; for some reason, debug:print does not work here. Had to use print.
(with-output-to-port (current-error-port)
(lambda ()
(print (conc "WARNING: loading " debugcontrolf))))
(load debugcontrolf)
)
)
)
;; usage logging, careful with this, it is not designed to deal with all real world challenges!
;;
|