How create a debugger for self-made language?

Viewed 1769

I wanna build a language, but I think that to be useful it need at least a REPL and a debugger.

How incorporate a debugger is the thing that look like magic to me. I remember how great the old Visual FoxPro was, and how much sucks the xcode (in comparison) so I suspect is something hard.

Which kind of language make easier to integrate a debugger? A interpreter? Compiled? Imperative? Functional?

Make a difference if the language is made in LLVM, Lua/LuaJit, on top of objective-c? (I ask about this because for my pet language how easier could be is a critical factor. So the easier target that will make a easier answer, I suppose)

Is the best way to use GDB/LLDB or roll my own?

Where to look about this?

2 Answers

Visual Studio Code offer the possibility to implement your own extensions adding:

  • Custom Language
  • Custom REPL
  • Custom Debugger

Here is a tutorial covering all those topics step by step.

Related