Improve debuggees' event handling