Debugging RxJava code

RxJava is not easy to debug at first glance, primarily due to the lack of debug tooling and the large stack traces it can produce. There are efforts in creating effective debugging tools for RxJava, most notably the Frodo library for Android (https://github.com/android10/frodo). We will not cover any debugging tools for RxJava as nothing has been standardized quite yet, but we will learn about an effective approach that you can take to debug reactive code.

A common theme in debugging RxJava operations is finding the bad link or the operator in the Observable/Flowable chain that is causing the problem. Whether an error is being emitted, onComplete() is never being called, or an Observable is unexpectedly empty, you often ...

Get Learning RxJava now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.