I’d like to try this debugger out, however hacwaly/ocamlearlybird extension is ostensibly missing from https://open-vsx.org/, it’s only present on M$ marketplace. Does it mean I need to get the extension from git and do some manipulations from my machine to install in VSCodium? Anybody can help me with the steps?..
P.S. I have actually pleaded with Hackwaly to take on the trouble of uploading to one more extension repository, let’s see if he’s got time for this
Actually the hacwaly/ocamlearlybirdreadme does suggest to first opam install earlybird and then to install the extension.
This is also how I got OCaml Platform to work: first opam install ocaml-lsp-serverthen install OCaml Platform extension.
And that is also how I got Haskell support to work in VSCodium: first install made sure that haskell-language-server-wrapper is on my $PATH and then installed Haskell extension to VSCodium. This seems like a pattern.
Even though for Haskell the VSCod(e/ium) extension is said to be smart enough to download pre-built -haskell-language-server.
P.S. now after some looking around I suspect that I will either need to a) install from M$ marketplace, or b) wait for author to publish to https://open-vsx.org/ or c) install nodejs, git clone earlybird repository perform package in ~/.opam/myswitch/.opam-switch/sources/earlybird.1.0.0/integrations/vscode to produce this vsx file and then have VSCodium digest it… No automatic updates for me under option c), c’est la vie… (b) would have been best I guess
opam install earlybird
# that installs LOTS AND LOTS OF STUFF...
sudo apt-get install nodejs
sudo apt-get install npm
sudo npm install -g vsce
git clone https://github.com/hackwaly/ocamlearlybird.git
This resulted in ocamlearlybird-1.0.1.vsix which I installed into VSCodium
Now when I right-click proj1.bc I do get this Start an OCaml Debug Session menu item.
I’ve even made my launch.js look like this:
However when I click that Start an OCaml Debug Session menu item nothing much happens!
A blue progress line runs for 5-10 seconds and it’s all!
Yes it does look like it’s trying to run my try debug launch config…
But really nothing happens!
I don’t stop on my breakpoint, my one-line program print_endline "Hello, world 42 42!" isn’t executing, there’s no output anywhere… not in OUTPUT not in TERMINAL… All the same when I run _build/default/proj1.bc it works - it prints that line… Nothing helps…
This /usr/bin/env CAML_DEBUG_SOCKET=127.0.0.1:... ... that is seen in the video just never gets printed to the terminal… I even did an opam install . in a fresh git checkout to use absolutely latest ocamlearlybird code but it didn’t help either
Update: since I already went this far I have decided to trouble the author with a new issue
i would greatly appreciate if you could start a new thread and move all your questions there because they really have nothing to do with the question i have asked at the beginning of this tread.
Now the thread is cluttered with unrelated stuff and nobody seems to be willing to answer it.
Thanks in advance
I have suggested my guess in post #2 on this thread and @gopiandcode expressed his agreement by adding his ‘like’. I guess that’s as far as we’re going to get with the question as posed…
It does seem like utop being part of the picture is red herring and the debugger is supposed to be able to operate on any OCaml program compiled to bytecode.
My feeling is that this is a fair use of the topic. I am treating it as a generic topic on ocamlearlybird and in my view it would have created clutter to create a new one.
Further it seems that me and you are the only people willing to engage in a discussion at this level of proficiency in OCaml universe
So here goes my question to you: does it really work for you? Can you please help me get it to work if it does work for you?
I also feel pretty confident that you have a version of extension installed in VSCode. My experience is that without this extension you just don’t get the menu item we’re talking about.
I have engaged in a conversation with the author, but he hasn’t been able to spend that much time so far on the problem I’m seeing. I asked him to produce a special version of the extension with more logging, however unfortunately his answer was
So it really comes down to us to help each other. Or else abandon this debugger and debug in different ways.