Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting OCaml to F#: Is there an OCaml IDE with GUI debugging like Visual Studio

I am converting several modules from OCaml to F#. To hunt bugs and verify some of the finer differences I am running both versions against the same test case at the same time.

For F# I am using the Visual Studio debugger and for OCaml I am using ocamldebug. Since Visual Studio is a GUI and ocamldebug is a command line, making the comparisons requires more attention than back and forth visual scanning.

I was wondering if there is any OCaml IDE that supports a GUI debugger with stepping while showing the source line highlighted and separate window to display values.

EDIT

I did some more looking after Jack posted an answer and then remembered why I didn't pick one a few months ago when I did this.

The reasons I am passing on the ones I find and staying with the OCaml command line tools are

  1. The command line tools come with the compiler, so they are current and work. There is some documentation on the tools, but honestly I did have to spend a few hours writing my own ocamldebug manual with examples to become proficient with ocamldebug.

  2. They rely on EMACS. It's not EMACS but me; I just hate the way it works. Also all of the tools working with EMACS I found they are just wrappers around ocamldebug. So nothing gained but more memorization of commands. Note: EMACS is actively maintained and updated.

  3. They rely on Eclipse. I have used Eclipse a lot for working with ANTLR, but I only make a system every few years and have very good notes on it so it is worth my time. Once I get Eclipse working for a major ANTLR release, I don't update it again for years. For the small amount of time I plan on debugging OCaml, the cost is too high. Note: Eclipse is actively maintained and updated.

  4. They don't do debugging. Since there are so few GUI tools for OCaml, even an enhanced editor is a benefit for some. Not for me at this time.

  5. The tool/plug-in has not been maintained for some years.

This not a put down of OCaml, just the details as I find them. I don't have a problem with OCaml, I just wish I was more productive with it.

like image 360
Guy Coder Avatar asked Sep 15 '12 13:09

Guy Coder


3 Answers

I think most people are just using the OCaml debugger (ocamldebug) from within emacs (see the bottom of that page for details).

I don't know if it supports debugging (yet), but the TypeRex OCaml Programming Studio looks like an interesting project.

Finally, there are some old, unmaintained Eclipse plugins you could try (e.g., Camelia), though I suspect they've bit-rotted for too long to be of much use at this point.

like image 66
Jack P. Avatar answered Sep 28 '22 07:09

Jack P.


I was unable to find an OCaml GUI debugger with the same ability as Visual Studio using F# that meet my requirements.

If someone does find one or creates one and post that as an answer I will gladly give them them accept vote.

like image 35
Guy Coder Avatar answered Sep 28 '22 08:09

Guy Coder


I was wondering if there is any OCaml IDE that supports a GUI debugger with stepping while showing the source line highlighted and separate window to display values.

I'm only just getting back into OCaml and Linux now after a 4 year break but, last I looked, Linux had very poor GUI libraries and OCaml had very poor interoperability so nobody ever got very far writing non-trivial GUI applications in OCaml.

like image 28
J D Avatar answered Sep 28 '22 07:09

J D