Open NanaKay007 opened 2 years ago
What's the version of your ocaml compiler?
There are two sections to this comment.
(1) When I run Ocamlearlybird, I get a "unsupported file format" error. This is how I get the error - I enter into VS Code a hello world program - print_string "Hello world!\n";; I click "Run without Debugging". Under "Select Environment" (pull down menu), I select Ocamlearlybird. I get the "Unsupported file format" error.
(2) When I launch a terminal and type in the following commands - $ ocamlc -o helloworld helloworld.ml # to compile 'helloworld.ml' into an executable 'helloworld' $ ./helloworld # to run the program , I successfully get a "Hello world! output.
Question - I would like to use the first method (clicking on "Run without Debugging") to get the "Hello world!" output. What must I do?
The debuggee program should be bytecode file. Native executable is not supported. And currently only ocaml.4.10 4.11 is supported
bytecode
how to provide bytecode file in this case.
I have same problem. I followed the example [https://i.imgur.com/U3GDHXM.gif], but get "Unsupported file format".
I test with Ocaml Version 4.14.0 and 5.0.0 and get same problem. What should I do?
You need install the ext built from master branch
You need install the ext built from master branch
I clone this repo and install with "opam install .". If I command ocamlearlybird --help, I can get Ocamlearybird Manual. Anything more to do?
Right now you also need to build the VSCode extension yourself. The one published on VSCode marketplace isn't compatible with newer OCaml versions.
By the way, I'm planning to revive the effort to simply make the official VSCode OCaml Platform extension take care of that side: https://github.com/ocamllabs/vscode-ocaml-platform/issues/534 and https://github.com/ocamllabs/vscode-ocaml-platform/pull/650. This should make the process more user-friendly.
Right now you also need to build the VSCode extension yourself. The one published on VSCode marketplace isn't compatible with newer OCaml versions.
It works well. Thank you so much. I look forward to being added to the offical OCaml Platform extension.
Anytime I run the extension, I get this un-informative error "Unsupported file format". This is my launch.json file: