Remove debugger object when closing it