OCAMLDEBUG(1)
π OCAMLDEBUG(1) π
okay bestie, welcome to the General Commands Manual section, and today we're talking about the one, the only: ocamldebug β¨
πΈ NAME πΈ
ocamldebug β the OCaml source-level replay debugger. yes she replays. she rewinds. she's that girl π
π SYNOPSIS π
ocamldebug [ options ] program [ arguments ]
π¦ DESCRIPTION π¦
ocamldebug is the OCaml source-level replay debugger. no cap, that's literally what it is π
but listen β before you can even use the debugger, your program has to be compiled and linked with the -g option. like, every single .cmo and .cma file that's part of your program should have been created with ocamlc -g, and then they all have to be linked together with ocamlc -g. no shortcuts, bestie.
and here's the iconic part: compiling with -g has zero penalty on the running time of your programs. like, none. the object files and bytecode executable files get bigger and take longer to produce, sure, but the executable files run at exactly the same speed as if they'd been compiled without -g. the way that's so generous of her ππ
β¨ OPTIONS β¨
here's a summary of the options, bestie. for the complete description you're gonna want the html documentation in the ocaml-doc package. iykyk.
-ccount β sets the maximum number of simultaneously live checkpoints to count. that's the cap, periodt.-cddir β run the debugger program from the working directory dir, instead of the current working directory. (also see thecdcommand, bestie.)-emacsβ tells the debugger it's being executed under Emacs. (check The OCaml user's manual for how to run the debugger under Emacs.) this one implies-machine-readable, so she's already in machine mode the second you ask π«Ά-Idirectory β adds directory to the list of directories searched for source files and compiled files. (also see thedirectorycommand.)-machine-readableβ prints information in a format that's more suitable for machines instead of human operators, where applicable. for example, when describing a location in a program β like when printing a backtrace β it prints the program counter and character offset in a file instead of the filename, line number, and character offset in that line. robots only, no vibes π-ssocket β uses socket for communicating with the debugged program. see the description of the commandset socketin The OCaml user's manual for the format of socket.-versionβ prints the version string and exits. bye β¨-vnumβ prints the short version number and exits. shorter bye β¨-helpor--helpβ displays a short usage summary and exits.
π INITIALIZATION FILE π
when ocamldebug(1) gets invoked, she reads commands from an initialization file before handing control over to you. main character energy honestly.
the default file is .ocamldebug in the current directory if it exists β otherwise it's .ocamldebug in the user's home directory. so she checks your room first, then goes home π
ngl, you can also use the source file command to read commands from a file. two ways to feed her, bestie.
β SEE ALSO β
ocamlc(1).- The OCaml user's manual, chapter "The debugger".
π AUTHOR π
this manual page was written by Sven LUTHER <luther@debian.org>, for the Debian GNU/Linux system (but may be used by others). we love a generous king π
okay and that's the whole page!! π she's catalogued as OCAMLDEBUG(1) β the page footer, her whole lil signature β and the header up top is straight from the General Commands Manual. now go compile with -g and go slay, bestie π
ππ¦
π¦ where this page comes from
- alpine 3.22: ocaml5-doc 5.3.0-r0 Β· LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception
- alpine 3.23: ocaml5-doc 5.4.0-r0 Β· LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception
- alpine 3.24: ocaml5-doc 5.4.1-r0 Β· LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception
- arch rolling: ocaml 5.5.0-1 Β· LGPL2.1 AND custom: QPL-1.0
- centos-stream 10: ocaml-docs 5.2.0-5.el10 Β· LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception
- debian trixie: ocaml 5.3.0-3 Β· LGPL-2.1-OCaml
- fedora 43: ocaml-docs 5.3.0-4.fc43 Β· LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception
- fedora 44: ocaml-docs 5.4.0-2.fc44 Β· LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception
- nixos 26.05: ber-metaocaml 153
- nixos 26.05: ocaml 5.4.1
- nixpkgs unstable: ber-metaocaml 153
- nixpkgs unstable: ocaml 5.5.1
- nixpkgs unstable: ocaml-solo5 1.3.5
- ubuntu questing: ocaml 5.3.0-3
- ubuntu resolute: ocaml 5.4.0-3ubuntu1 Β· LGPL-2.1-OCaml
- ubuntu stonking: ocaml 5.4.1-1ubuntu1 Β· LGPL-2.1-OCaml
- Copyright 2001 Institut National de Recherche en Informatique et
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms