Cannot get it to work
Opened this issue · 15 comments
The regular "ocamldebug" works, but how come I can't get this ocaml-debugger to work following the information on this page https://marketplace.visualstudio.com/items?itemName=hackwaly.ocaml-debugger. Does it need to recognize the correct path to earlybird or something?
Yes. It need earlybird in PATH that vscode can find.
There's no configuration item for now. Maybe you forgot to restart vscode after earlybird installed. Or you didn't configure correctly opam. Doies earlybird works in terminal?
Okay I will assume that there's configuration in the settings. Also, I am using WSL btw. I assume opam is working correctly because merlin works. Also, when I try to install earlybird using opam again I get this:
pure@Sophie:~/wsl-stuff/ocaml$ opam install earlybird
[NOTE] Package earlybird is already installed (current version is 0.1.4).
What do you mean using earlybird in the terminal? Is it like using gdb or rlwrap?
WSL is not tested. I suggest you to use VS Remote to use WSL or docker to use this plugin
Kind of unsure what using VS Remote means, but I never had experience with docker or know what it is, here is a video of what I tried to do. Not sure most of the time:
Additionally what I was told by an instructor or TA was "this extension works on binary Ocaml files like using gcc for C files. Apparently, this is a 'different' build process than 'we use in class' (not sure what they mean). The two compilers for .ml files are ocamlc (byte code), like ocamlc -g src/main.ml (assuming what this debugger uses), and ocamlopt (machine code (assuming maybe they mostly compile with ocamlopt in class)). We would want to use the 2nd one for 'this case': ocamlopt f1.ml f2.ml f3.ml, which are files used in the projects we are trying to debug. This can be a bit complicated where the file has to be in a sequence where no file is before in the sequence that depends on a file later in the sequence. It also gets complicated when using external libraries, which are used in some of our projects. (as of now, not sure how the class compiles but they just use dune utop src and dune runtest to unit test code). When we assume things compile correctly, and a.out file is made and be used by this debugger extension. However, we just recommend using dune utop src (I don't really have a clue how this is useful and just assume that this is just for unit testing) and incrementally test pieces of your code instead of using a native Ocaml debugger, which would be less useful in the long run than testing your code in either of these advised way (assuming the ways are oUnit tests or dune utop src)
We would want to use the 2nd one for 'this case': ocamlopt f1.ml f2.ml f3.ml, which are files used in the projects we are trying to debug.
I'm sorry, but this extension only works for bytecode. Debug native build should waiting official ocaml team to support.
Could you please open terminal in WSL:ubuntu vscode instance then run "earlybird --help" to check is it right?
Could you please open terminal in WSL:ubuntu vscode instance then run "earlybird --help" to check is it right?
Do you mean ocamlearlybird --help
?
Could you please open terminal in WSL:ubuntu vscode instance then run "earlybird --help" to check is it right?
Do you mean
ocamlearlybird --help
?
Yes
So you should make it available for that then this extension should works
@PurePureMilk This maybe you have installed earlybird
in project level, it's should installed on global, or we need a config for ocamlearlybird
path? @hackwaly
Pull requests are welcome. I haven't use ocaml a long time