MacroPackage: ideToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version

with-trace-color

Arguments: (rgb-color) &body body

Causes all traced calls that occur within the dynamic scope of body (in the current process) to appear in the Trace Dialog with the background color specified by rgb-color, which must be an RGB color object (see make-rgb). Returns the values returned by the last form in body.

It may be useful to add calls to with-trace-color in tester code to distinguish calls made within a tester form from extraneous calls that happen to be made otherwise, or even to distinguish multiple tested options or multiple test runs from each other. Calls to with-trace-color may even be inserted into application code and left there when generating a standalone application to distribute, because in a standalone app the calls turn into simple progn forms.

For example, evaluating the following forms (after showing the Trace Dialog with the Run | Trace dialog command) will trace a few functions and then collect pale green trace output for the calls to those functions that occur during a particular call to make-window. Lots of additional calls to device-open will appear as well in the Trace Dialog as arbitrary strings are created, and so the green highlighting helps to quickly find the block of calls that occurred within the tester form.

(trace make-window device-open initialize-instance)

(ide:with-trace-color ((make-rgb :red 224 :green 255 :blue 224))
  (make-window :foo :class 'frame-window))

See process-trace-color.


Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version