Complete
over 4 years ago

WERETECH-6805

This was addressed in CIQ 3.1.1.

How to debug an unhandled exception

On a fresh Eclipse install on macOS High Sierra with recommended settings (several example apps do build and run), I can't seem to get a strack trace after an unhandled exception (aka app crash). Without that information, it's pretty much impossible to debug an app, so I guess I just missed some setting.

What did I miss?
Former Member
Former Member
Parents
  • I'd have to agree that it'd be nice to have the debugger automatically always include the stack trace in unhandled exceptions. I had never actually used the try/catch block in MonkeyC until just now and it was interesting how you can display the stack trace there. I've never understood why sometimes I do and sometimes I don't get the stack trace by default in the simulator. Seems bizarre to me that it doesn't always show it and thought I just had something wrong in my configuration. I generally don't use exception handling as I'd rather have the code be bullet proof, rather than dealing with unexpected exceptions. Unless you are calling a function or method that explicitly states it can cause and exception, exception handling seems like a bandaid fix. If you have bugs that can cause exceptions, you're probably going to have more bugs in the exception handling itself. And with a limited memory system like this, better to just get the code right to begin with.
Comment
  • I'd have to agree that it'd be nice to have the debugger automatically always include the stack trace in unhandled exceptions. I had never actually used the try/catch block in MonkeyC until just now and it was interesting how you can display the stack trace there. I've never understood why sometimes I do and sometimes I don't get the stack trace by default in the simulator. Seems bizarre to me that it doesn't always show it and thought I just had something wrong in my configuration. I generally don't use exception handling as I'd rather have the code be bullet proof, rather than dealing with unexpected exceptions. Unless you are calling a function or method that explicitly states it can cause and exception, exception handling seems like a bandaid fix. If you have bugs that can cause exceptions, you're probably going to have more bugs in the exception handling itself. And with a limited memory system like this, better to just get the code right to begin with.
Children
No Data