Debugging synchronous Python code is traditionally done with the Python debugger (pdb or ipdb). Unfortunately, this tool is almost useless in asynchronous code, and in reactive code. The reason is that in synchronous code when an exception is raised without being caught, the program stops. From that situation, using the debugger or just reading the printed stack trace allows going very quickly to the source of the error. However, with AsyncIO and ReactiveX the situation is different:
- On AsyncIO, an exception is propagated until the event loop. The event loop does not exit but interrupts the current task and prints the error. The rest of the application continues to run after that.
- On ReactiveX, an exception is transposed ...