spand
02/22/2018, 3:33 PMorangy
spand
02/27/2018, 12:25 PMvar debug: Boolean
on Route. A debugging strategy would then consist of enabling it on the most specific Route handler and gradually expand out manually by edit, compile, retry until the fault is located. Nested Route matchers inherit this debug flag. Debug enabled routes then output why they either match (or maybe be silent in this case) or do not match (maybe something like Hamcrest but could be overkill) to the logger.orangy
trace
function on Routing that receives a lambda to do whatever you want with the trace:
routing {
trace { trace: RoutingResolutionTrace ->
println(trace)
}
…
}
When routing completes and before it executes selected handler, it would call trace
function (no trace collection if trace function is not installed). You can print a trace, or simply set breakpoint and inspect it in the debugger.spand
02/27/2018, 2:34 PM