Android Studio IDE: Break on Exception

To break on all exceptions, caught or uncaught: Open the Breakpoints window via Run -> View Breakpoints. The Breakpoints dialog appears. In the left pane, scroll to the bottom. Select Any exception under Java Exception Breakpoints With Any exception selected, on the right pane, configure as follows: Suspend: checked All: selected Condition: !(this instanceof java.lang.ClassNotFoundException) … Read more

How to go to the previous line in GDB?

Yes! With the new version 7.0 gdb, you can do exactly that! The command would be “reverse-step“, or “reverse-next“. You can get gdb-7.0 from ftp.gnu.org:/pub/gnu/gdb If you run into the error: Target child does not support this command. then try adding target record at the beginning of execution, after starting run. Edit: Since GDB 7.6 … Read more

How to get R script line numbers at error?

This won’t give you the line number, but it will tell you where the failure happens in the call stack which is very helpful: traceback() [Edit:] When running a script from the command line you will have to skip one or two calls, see traceback() for interactive and non-interactive R sessions I’m not aware of … Read more

How to debug Google Apps Script (aka where does Logger.log log to?)

UPDATE: As written in this answer, Stackdriver Logging is the preferred method of logging now. Use console.log() to log to Stackdriver. Logger.log will either send you an email (eventually) of errors that have happened in your scripts, or, if you are running things from the Script Editor, you can view the log from the last … Read more