class DebuggableObservable[Self[+_] <: Observable[_], +A] extends AnyRef
This implicit class provides debug* methods for observables, e.g.:
stream.debugWithName("MyStream").debugSpyStarts().debugLogEvents()
The result of the chain is an observable that you should use in place
of the original observable (stream in this case).
The implicit conversion to this class is defined in the Observable companion object.
This is not a value class because DebuggableSignal needs to extend this. The performance penalty of one extra instantiation per debugged stream should not be noticeable.
- Alphabetic
- By Inheritance
- DebuggableObservable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new DebuggableObservable(observable: BaseObservable[Self, A])
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[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def debugBreak(when: (Try[A]) => Boolean = always): Self[A]
Trigger JS debugger for emitted events and errors if
whenpasses Note: for Signals this also triggers onStart (with the current value at the time) - def debugBreakErrors(when: (Throwable) => Boolean = always): Self[A]
Trigger JS debugger for emitted errors (but not events) if
whenpasses Note: for Signals this also triggers onStart (if current value is an error) - def debugBreakEvents(when: (A) => Boolean = always): Self[A]
Trigger JS debugger for emitted events (but not errors) if
whenpasses Note: for Signals this also triggers onStart (if current value is not an error) - def debugBreakLifecycle: Self[A]
Trigger JS debugger when the observable starts and stops
- def debugBreakStarts: Self[A]
Trigger JS debugger when the observable starts
- def debugBreakStops: Self[A]
Trigger JS debugger when the observable stops
- def debugLog(when: (Try[A]) => Boolean = always, useJsLogger: Boolean = false): Self[A]
Log emitted events and errors if
whencondition passes, using dom.console.log ifuseJsLoggeris true.Log emitted events and errors if
whencondition passes, using dom.console.log ifuseJsLoggeris true. Note: for Signals this also triggers onStart (with the current value at the time) - def debugLogErrors(when: (Throwable) => Boolean = always): Self[A]
Log emitted errors (but not regular events) if
whencondition passes Note: for Signals this also triggers onStart (if current value is an error) - def debugLogEvents(when: (A) => Boolean = always, useJsLogger: Boolean = false): Self[A]
Log emitted events (but not errors) if
whencondition passes, using dom.console.log ifuseJsLoggeris true.Log emitted events (but not errors) if
whencondition passes, using dom.console.log ifuseJsLoggeris true. Note: for Signals this also triggers onStart (if current value is not an error) - def debugLogLifecycle(logStarts: Boolean = true, logStops: Boolean = true): Self[A]
Log when the observable starts and stops
- def debugLogStarts: Self[A]
Log when the observable starts
- def debugLogStops: Self[A]
Log when the observable stops
- def debugSpy(fn: (Try[A]) => Unit): Self[A]
Execute fn on every emitted event or error Note: for Signals this also triggers onStart (with the current value at the time)
- def debugSpyErrors(fn: (Throwable) => Unit): Self[A]
Execute fn on every emitted error (but not regular events) Note: for Signals this also triggers onStart (if current value is an error)
- def debugSpyEvents(fn: (A) => Unit): Self[A]
Execute fn on every emitted event (but not error) Note: for Signals this also triggers onStart (if current value is not an error)
- def debugSpyLifecycle(startFn: (Int) => Unit, stopFn: () => Unit): Self[A]
Execute callbacks on when the observable starts and stops
Execute callbacks on when the observable starts and stops
- startFn
topoRank => ()
- def debugSpyStarts(fn: (Int) => Unit): Self[A]
Execute callbacks on when the observable starts
Execute callbacks on when the observable starts
- fn
topoRank => ()
- def debugSpyStops(fn: () => Unit): Self[A]
Execute callbacks on when the observable stops
- def debugTopoRank: Int
Return the observable's topoRank.
Return the observable's topoRank. This does not affect the observable in any way.
- def debugWithName(displayName: String): Self[A]
Create a new observable that listens to the original, and set the displayName of the new observable.
Create a new observable that listens to the original, and set the displayName of the new observable. This is different from
setDisplayName.If you say
stream.debugWithName("foo").debugLog(), the displayName used by the logger will be "foo" verbatim, whereas if you saystream.setDisplayName("foo").debugLog(), the logger's displayName will be "foo|Debug" – with a suffix – to differentiate it from the "foo" displayName ofstreamitself. - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def log(action: String, value: Option[Any], useJsLogger: Boolean): Unit
- Attributes
- protected[this]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val observable: BaseObservable[Self, A]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated