I'll use Python as an example as that is what I am using to build huge distributed applications right now.
Twisted python allows for a very imperative style using either inlinecallbacks or (slightly uglier) deferredGenerator styles. These methods allow you to write procedures that use event driven callback code that is much easier to read and understand. The implementation turns your function into a lazy sequence that yields a sequence of deferreds.
Specifically, you don't have to build a deeply nested set of callback functions/lambdas/closures, and can instead yield control of a function back to the event loop at arbitrary points. You can mentally re-label this as coroutines or cooperative multitasking if you like. It gets the job done. An example would be (using the uglier deferredGenerator style) like this:
@defer.deferredGenerator
def foo(arg):
bar = nonBlockingFunction(foo)
baz = waitForDeferred(aFunctionThatReturnsADeferredToo(bar))
yield baz #Returns control to the event loop
output = baz.getResult() #This gets the output of aFunctionThat...Too above
yield output #This is how we return a result instead of using return
@defer.deferredGenerator
def aFunctionThatReturnsADeferredToo(put_bar_here):
"""Stuff happens here...."""
...etc...
There is another post here that shows the inlineCallbacks method, which is cleaner, but requires python 2.5 or newer (meaning not under Centos/RHEL 5 series, which I am sadly stuck with for my app). If you can use it DO SO.
As you can see, this looks like the old school python imperative stuff you know and love, but is WAY easier to maintain without a ton of nested functions and lambdas. I still wish python had blocks though.
As for debugging, you can turn on twisted reactor debugging using the defer.setDebugging(True) call somewhere in your initialization code. This will attach the original traceback that raised an exception in your code, so that you can trivially see where the error ACTUALLY occurred. Just remember to redact the setDebugging statement before going production, because it results in a HUGE amount of extra introspection (watch it in strace if you want to be utterly horrified).