The show command enables
you to view the status of an object. It enables you to view the status
of the object by subject. Subjects include existence, attributes,
methods, and events.
For example, the following
command displays a list of all B[5] attributes and
their current values:
show B[5] attributes
Syntax
show <object> <interest-list>
Arguments
object
Specifies the object to be traced. It
can be one of the following items:
- The name of a class appearing in code, such as A.
The trace command is applied to all instances of class A.
- The name of an instance that currently exists in
the execution, such as A[3]. You cannot refer to
instances before their construction or after their destruction.
- A navigation expression, such as A[3]‑>itsB[2].
See Navigation expressions for more information.
- The name of a package appearing in the code. The
tracer will report on all classes in the package.
- A keyword understood by the tracer. These keywords
are not case-sensitive. The possible keywords are as follows:
- #All means all classes appearing
in code.
- #Breakpoints means the list of
all breakpoints.
- #CallStack means operations currently
on stack; that is, operations started but not yet terminated, including
behavior operations defined on transitions.
- #EventQueue means a queue of all
pending events; that is, events sent but not yet received.
- #Thread threadName->#CallStack means
the call stack of the thread threadName. (All operations
that started on this thread but have not yet terminated, including
behavior operations defined on transitions).
- #Thread threadName->#EventQueue means
the queue of all pending events of the thread name threadName.
(Events sent but not yet received.)
interest-list
Specifies the list of subjects, separated
by a commas. The interest list determines what information about the
object is reported to you.
This list is optional;
if you do not enter any subjects, the tracer reports on the existence
of the object only, as if you had executed the following command:
show <object> existence
The possible subjects are as follows:
Table 1. Possible subjects for show command| existence |
constructors |
| relations |
destructors |
| attributes |
timeouts |
| states |
parameters |
| controls |
subclasses |
| methods |
threads |
| events |
|
The subject existence reports
on the existence of the object.
The subject subclasses applies
the trace commands to all of the subclasses for a class. It is relevant
only to class objects.
The following keywords
can be used to define which objects to show (they are not case sensitive):
- #All shows the subjects in the
interest list for all classes in code.
- #All events displays all the events
recognized by the system. This is useful if you forget the exact name
of an event.
- #Thread threadName->#CallStack / #CallStack shows
all operations currently on stack on the thread threadName on
the focus thread.
- #Thread threadName-># EventQueue/# EventQueue shows
all events currently in queue on the thread threadName on
the focus thread.
- #Threads shows the status of all
threads. Each live thread is displayed as either reactive or suspended.
One of the threads has an asterisk by its name, indicating it is the
active thread.
- #Breakpoints shows a list of currently
active breakpoints.
Examples
show A[0] states
Shows the current states of A[0].
show #all all
Displays all information about all instances.
show #Breakpoints
Shows all breakpoints.
show #Threads
Shows all threads.
Show MyClass relations
Shows all relations of all instances
for every instance of MyClass.
Special Cases
Consider
the following special cases when using the show command:
- Instance objects means only the relation,
attribute, and state subjects are relevant.
- Class objects means showing a class displays
a list of all instances belonging to that class. If the interest list
includes subclasses, the tracer also displays instances of subclasses.
If the interest list contains subjects relevant for instance objects,
each displayed object also displays itself with respect to these subjects.
For example, the command show A states results
in the following code:
A[1]
A[2]
A[3]
A[1] currently in states
ROOT
ROOT.S1
ROOT.S1.S2
A[2] currently in states
ROOT
ROOT.S7
ROOT.S8
A[3] currently in states
ROOT
ROOT.S1
ROOT.S1.S2