There are a few reasons where I think it’d be nice to embed a DAP server, as an interpreter binary would work/debug out of the box with IDEs that support it.
There are also some wonky things and drawbacks, but I’d love to hear thoughts on this sort of effort. I’m not in a position to flesh out a refined proof of concept, but I’d love to collaborate if it would make sense and someone were interested.
I also appreciate that there may be technical limitations that make this idea not a good one.
I consider the main issue is: the interpreter is quite originality, in fact, except try some little snippets in REPL, use debugger in a project almost always not work because interpreter bugs, unless a hello world project, most of them seem like quite hard to fix according to the asterite.
so, the hard part not DAP server, instead of, the robust interpreter.
Hm, I haven’t noticed interpreter bugs so far, but a DAP server would be downstream from the interpreter itself - so any bugfixes would automatically apply when using an IDE. So I don’t consider the interpreter to be blocking IDE debugging at all, but rather allowing it to exist.
Awesome! I understand if y’all are too busy, but would anyone have any any interest in a brief technical walk-through of the interpreter code? I have rudimentary knowledge of C and low level Crystal data types, and not very much knowledge of the compiler. I have been following along alright so far (and learning a lot!), but I feel a walk-through would be more efficient than learning by reverse-engineering.
If there is interest, I think it could be really great to record such a session so that anyone could access (and even pick up the work) asynchronously. What I’ve found so far is that the compiler/interpreter codebase is largely intuitive once I connect the dots, but connecting the dots can take me a while from having limited experience with the problem space.