Improve event handling in debuggees