Improve frame cleaning in the debugger