Piping in Ocamldebug

I’m trying to learn how to use Ocamldebug and in my program reads directly from standard input (stdin):

let parse_in ic =
  In_channel.input_all ic
  |> String.split_on_char '\n'
  |> etc.

However, piping the input while debugging doesn’t work:

$ ocamldebug a.out < example.txt 
        OCaml Debugger version 5.1.1

(ocd) Unknown command.
(ocd) Unknown command.
(ocd) Unknown command.
etc.

because the input is getting piped to Ocamldebug and not a.out

I think you can do this by using the command set arguments < example.txt from within ocamldebug.

Cheers,
Nicolas