ocamlearlybird
is a debug adapter purely written in OCaml. See debug adapter protocol to get more information.
ocamlearlybird
can be installed with opam:
opam install earlybird
To use ocamlearlybird
in VS Code. Install the extension
- Auto discover sources heuristically
- Line breakpoints and column breakpoints
- Basic
next
,step in
,step out
andcontinue
commands - Inspect stack frames, local variables, closure variables and global variables
- Function breakpoints
- Limited expression evaluation
- Conditional breakpoints
- Time travel
By default ocamlearlybird
use stdin
and stdout
for debug adapter protocol. To launch ocamlearlybird
as debug adapter in server mode:
ocamlearlybird --server --port=4711
{
"name": "Debug",
"type": "ocaml-debugger",
"request": "launch",
"program": "${workspaceRoot}/_build/default/main.bc",
"console": "internalConsole",
"dotMerlins": ["${workspaceRoot}/.merlin"],
"noDebug": false,
"stopOnEntry": false,
"env": {
"OCAMLRUNPARAM": "b"
}
}