https://en.wikipedia.org/wiki/Compiler "A compiler is a computer program (or a set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language), with the latter often having a binary form known as object code."
To be honest, I never managed to get familiar with many debuggers in a fashion that I could use them productively, except for Microsoft's Visual Studio tools (VC++, good ol' VB6 :-)). I know enough GDB to survive, and from what I've seen Nim works there almost just as well as plain C code.
There was a special debugger for Nim that worked by inserting instrumentation code during compilation, but that seems to have been deprecated.
- https://hookrace.net/blog/what-makes-nim-practical/#debuggin...
- https://hookrace.net/blog/writing-an-async-logger-in-nim/#op...
Edit: You can of course also change the program itself, using echo and writeStackTrace to figure out what's going on.
For example, at the beginning of each function call, you insert a function call that pushes a new stack frame into some global stack, and store the function's arguments. Then, just before every return from the function, you pop the stack frame. When the program crashes, you write the stack to a JSON file, and use a language-specific debugger to view it.
[1] http://ftp.gnu.org/old-gnu/Manuals/gdb/html_chapter/gdb_11.h...