Packages

c

com.raquo.airstream.debug

DebuggableObservable

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.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DebuggableObservable
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new DebuggableObservable(observable: BaseObservable[Self, A])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. def debugBreak(when: (Try[A]) => Boolean = always): Self[A]

    Trigger JS debugger for emitted events and errors if when passes Note: for Signals this also triggers onStart (with the current value at the time)

  7. def debugBreakErrors(when: (Throwable) => Boolean = always): Self[A]

    Trigger JS debugger for emitted errors (but not events) if when passes Note: for Signals this also triggers onStart (if current value is an error)

  8. def debugBreakEvents(when: (A) => Boolean = always): Self[A]

    Trigger JS debugger for emitted events (but not errors) if when passes Note: for Signals this also triggers onStart (if current value is not an error)

  9. def debugBreakLifecycle: Self[A]

    Trigger JS debugger when the observable starts and stops

  10. def debugBreakStarts: Self[A]

    Trigger JS debugger when the observable starts

  11. def debugBreakStops: Self[A]

    Trigger JS debugger when the observable stops

  12. def debugLog(when: (Try[A]) => Boolean = always, useJsLogger: Boolean = false): Self[A]

    Log emitted events and errors if when condition passes, using dom.console.log if useJsLogger is true.

    Log emitted events and errors if when condition passes, using dom.console.log if useJsLogger is true. Note: for Signals this also triggers onStart (with the current value at the time)

  13. def debugLogErrors(when: (Throwable) => Boolean = always): Self[A]

    Log emitted errors (but not regular events) if when condition passes Note: for Signals this also triggers onStart (if current value is an error)

  14. def debugLogEvents(when: (A) => Boolean = always, useJsLogger: Boolean = false): Self[A]

    Log emitted events (but not errors) if when condition passes, using dom.console.log if useJsLogger is true.

    Log emitted events (but not errors) if when condition passes, using dom.console.log if useJsLogger is true. Note: for Signals this also triggers onStart (if current value is not an error)

  15. def debugLogLifecycle(logStarts: Boolean = true, logStops: Boolean = true): Self[A]

    Log when the observable starts and stops

  16. def debugLogStarts: Self[A]

    Log when the observable starts

  17. def debugLogStops: Self[A]

    Log when the observable stops

  18. 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)

  19. 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)

  20. 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)

  21. 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 => ()

  22. def debugSpyStarts(fn: (Int) => Unit): Self[A]

    Execute callbacks on when the observable starts

    Execute callbacks on when the observable starts

    fn

    topoRank => ()

  23. def debugSpyStops(fn: () => Unit): Self[A]

    Execute callbacks on when the observable stops

  24. def debugTopoRank: Int

    Return the observable's topoRank.

    Return the observable's topoRank. This does not affect the observable in any way.

  25. 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 say stream.setDisplayName("foo").debugLog(), the logger's displayName will be "foo|Debug" – with a suffix – to differentiate it from the "foo" displayName of stream itself.

  26. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  28. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  29. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. def log(action: String, value: Option[Any], useJsLogger: Boolean): Unit
    Attributes
    protected[this]
  32. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  33. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  34. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  35. val observable: BaseObservable[Self, A]
  36. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  37. def toString(): String
    Definition Classes
    AnyRef → Any
  38. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  39. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  40. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped