-
Notifications
You must be signed in to change notification settings - Fork 10
Debugging
TekMonks edited this page Dec 16, 2025
·
1 revision
Some tips to debug ASB flows
- Look at the logs. The ASB adds statements which allow tracing each message and how it flows using its timestamp. Eg
{"ts":"2025:12:16:15:12:36","level":"info","message":"[IMAP_LISTENER] Injected message with timestamp: 9681713747799296"}
- This can be
greppedto filter the flow. Egcat asb.log.ndjson | grep 9681713747799296will allow us to see the path the message took and which nodes it flowed into.
cat asb.log.ndjson | grep 9681713747799296
{"ts":"2025:12:16:15:12:36","level":"info","message":"[IMAP_LISTENER] Injected message with timestamp: 9681713747799296"}
{"ts":"2025:12:16:15:12:37","level":"info","message":"[ESB] Flow Knowledge lake chat using ASB is routing message with timestamp 9681713747799296 to route route.convertemail"}
{"ts":"2025:12:16:15:12:37","level":"info","message":"[ROUTE_JS] route.convertemail: Processing message with timestamp: 9681713747799296"}
Debugging inline Javascript code (inside JS route or other similar nodes) can become difficult. The best strategy is to place a manual break point using the debugger command. Eg. as shown in the following example
route.convertemail:
type: js
dependencies: listener.email
isAsync: true
js: |
message.content.query = message.content.texts.join();
debugger;
This allows easier debugging as the debugger will wait at this breakpoint allowing us to look at stack, variables or step in etc.
(C) 2018 - 2025 Tekmonks