class DebuggerFormat extends Debuggable
A concrete debuggable class whose toString
method evaluates
the expression theFormat
whenever it is called (normally
by the debugger). This is a notationally convenient way of
constructing a debugger-registerable object that can be used
to show (part of) the state of a running process.
For example, the copy process below keeps track of the number of
values it has copied, and of the last value. It registers
a DebuggerFormat
with the debugger, so that if the
debugger is invoked during the repeat
, then the current
state of the process will be shown when the debugger
is showing its registered objects.
def mycopy[T](in: ?[T], out: ![T]) = proc { var buf = in.nothing var n = 0 val format = new DebuggerFormat(s"$n: $buf") format.withDebugger(true) { repeat { buf=in?(); out!buf; n+=1 } } }
The method withDebugger
(see below) is a convenient
way of constructing and registering a debugger format
to be used during the evaluation of an expression.
- Alphabetic
- By Inheritance
- DebuggerFormat
- Debuggable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new DebuggerFormat(theFormat: ⇒ String)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
getWaiting: Seq[Thread]
Return a sequence of the threads currently waiting for this object, if any.
Return a sequence of the threads currently waiting for this object, if any. Default is the empty sequence.
- Definition Classes
- Debuggable
-
def
hasState: Boolean
This object has a state worth showing right now: false if showState will do no output.
This object has a state worth showing right now: false if showState will do no output.
- Definition Classes
- Debuggable
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
key: StateKey
This object's key in the registry (if non-negative)
This object's key in the registry (if non-negative)
- Definition Classes
- Debuggable
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
register(): Unit
Register this object
Register this object
- Definition Classes
- Debuggable
-
def
showState(out: PrintWriter): Unit
Show the current state of this object: default uses
toString
Show the current state of this object: default uses
toString
- Definition Classes
- Debuggable
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- DebuggerFormat → AnyRef → Any
-
def
unregister(): Unit
Unregister this object
Unregister this object
- Definition Classes
- Debuggable
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
withDebugger[T](condition: Boolean)(body: ⇒ T): T
Conditionally
register
this object with the debugger only for the duration of the evaluation ofbody
.Conditionally
register
this object with the debugger only for the duration of the evaluation ofbody
. To be used as a last resort for the exasperated CSO toolkit debugger.- Definition Classes
- Debuggable