Debugging DUNE far detector SW
Contents
Crashes
LArSoft will sometimes crash with a stack trace but other times simply exit prematurely without any error message. In the latter case, it may help to run in a debugger (e.g. gdb) and then print the stack trace when the program terminates. In gdb, the command "bt" will show the trace.
gdb
To run with gdb, I replace the command "lar $ARGS" with "gdb --args lar $ARGS" followed by the gdb command "r". One can also attach to an existing process with "gdb -a PID".
To stop execution when an exception is raised, use the gdb command "catch throw".
totalview
At FNAL, one can debug with totalview.
FCL
LArsSoft can have a rather complicated nest of FCL files to set parameter values. To see the final value assignments, export the variable ART_DEBUG_CONFIG=1 before running.