ocamldebug的命令行参数 [英] Command line arguments to ocamldebug

查看:126
本文介绍了ocamldebug的命令行参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将命令行参数传递给ocaml调试器?我正在寻找类似于gdbs --argsr ...params ... <的东西.例如,编译后

How can I pass command line arguments to ocaml debugger? I am looking for something similar to gdbs --args, or r ..., or params ... <. For example, after compiling

open Printf;;

let () =
  for i = 0 to Array.length Sys.argv - 1 do
    printf "[%i] %s\n" i Sys.argv.(i)
  done;;

是否可以逐步浏览可执行文件?

is there a way to step through the executable?

推荐答案

我发现了它,启动调试器后,必须设置参数,例如

I found it, after starting the debugger, you have to set the arguments, eg

(ocd) set arguments "a" "b" "C"
(ocd) r

这篇关于ocamldebug的命令行参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆