export OCAMLRUNPARAM="b1" to get a stack backtrace of an exception the code must be compiled with -g . Default (debug) in the _tags file