I tend to use debuggers a lot, generally speaking, while programming in various languages (even though purists may scoff at them). I’d love to get a feel of the debugging story in OCaml today.
Now we have some native debugging support being built by @mshinwell et all. Then we have
ocamldebug for debugging bytecode. I’d like to understand from people if this is a practical debugger or has bit-rotted away somewhat…
Can someone give me a feel of the overall state of debugging in
ocamldebug is today?
ocamldebugcan I debug programs that make use of libraries like ctypes and cstruct? (I realize I won’t be able to get into the C-code side of things but will debugging work properly in presence of functions that make FFI calls?)
- How reliable is
ocamldebugwhen debugging code when there are things like unix signal handlers installed in your OCaml program? I ask this question because I want to do a bit of linux “system” programming in OCaml but I want to be sure if I will be able to reach out to the debugger when things start going wrong… I know I can use gdb on my native executable even today but the experience is not going to be very good is it?
- How robust is the ocamldebug debugger generally?
- What would be the kind of slowdown I should expect using ocamldebug vs say, gdb (with the proposed DWARF integration work being done by @mshinwell) ?
- How usable is record-replay for a program that is, say, ~20k lines of code in ocamldebug?
- Are there problems when debugging code that has a lot of ppx extensions in it?
I know these are a huge number of questions. Please answer as few (or as many) as you want !