How do I use PDB files

PDB files map an assembly’s MSIL to the original source lines. This means that if you put the PDB that was compiled with the assembly in the same directory as the assembly, your exception stack traces will have the names and lines of the positions in the original source files. Without the PDB file, you … Read more

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

What flags do you set for your GFORTRAN debugger/compiler to catch faulty code?

Bare minimum -Og/-O0 -O0 basically tells the compiler to make no optimisations. Optimiser can remove some local variables, merge some code blocks, etc. and as an outcome it can make debugging unpredictable. The price for -O0 option is very slow code execution, but starting from version 4.8 GCC compilers (including the Fortran one) accept a … Read more

Debugging in Clojure? [closed]

There’s also dotrace, which allows you to look at the inputs and outputs of selected functions. (use ‘clojure.contrib.trace) (defn fib[n] (if (< n 2) n (+ (fib (- n 1)) (fib (- n 2))))) (dotrace [fib] (fib 3)) produces the output: TRACE t4425: (fib 3) TRACE t4426: | (fib 2) TRACE t4427: | | (fib … Read more