From ad29a93ccb620b2bb825b510caf80df0abebd0d3 Mon Sep 17 00:00:00 2001 From: kske Date: Wed, 24 Nov 2021 10:37:21 +0100 Subject: [PATCH] Add debugging section to README --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 84a0d31..4ce68a9 100644 --- a/README.md +++ b/README.md @@ -159,6 +159,17 @@ The same applies when an exception event handler throws an exception. To avoid this, system events never cause system events and instead just issue a warning to the logger. +## Debugging + +In more complex setups, taking a look at the event handler execution order can be helpful for debugging. +Event Bus offers a method for this purpose which can be used as follows: + +```java +System.out.println(EventBus.getInstance().printExecutionOrder(SimpleEvent.class)); +``` + +Then, the execution order can be inspected in the console. + ## Installation Event Bus is available in Maven Central.