views:

863

answers:

2

The Objective Caml language will only produce stack traces if you ask for them just right - what are the requirements for both bytecode and native code?

+10  A: 

Compile with -g and set environment variable OCAMLRUNPARAM=b

Thelema
For native code, I believe this only works for OCaml v3.10 or later.
Chris Conway
+1  A: 

Some Printexc functions let you do this programmatically.

Tobu