I think if fixing the debug error needs certain code logic to change, then the debugger can't always continue, and has to close. Sometimes you can fix an issue, and sometimes not, in my experience.
This is all part of testing, and developing a robust app that handles any circumstance without...