add "--debuginfo --linedir:on" to your compile command, and install NativeDebug in vscode. After that, change your lunch.json so that the gdb/lldb configuration is pointing to the correct executable.
ref: https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html
Thank you, that has been helpful, and I'm making some progress, but here I'm stuck again. As far as I can see, the program compiles to binary which I can start from console and it works correctly, but I don't see it running from VS Code interface: I was assuming I will get the output of the program somewhere down there in terminal because I used "Run withoud debugging" command.
All I get is:
* Executing task in folder Nim: /snap/bin/nim-lang.nim c -d:debug --debuginfo --lineDir:on --debugger:native main.nim
Hint: used config file '/snap/nim-lang/1589/config/nim.cfg' [Conf]
Hint: used config file '/snap/nim-lang/1589/config/config.nims' [Conf]
....
Hint: [Link]
Hint: 22417 lines; 0.163s; 25.59MiB peakmem; Debug build; proj: /home/xxx/Nim/main.nim; out: /home/xxx/Nim/main [SuccessX]
* Terminal will be reused by tasks, press any key to close it.
How can I actually see the output of it in VS Code?
The recommended extension is the one published by nim-lang.org . It is relatively recent so it has less downloads than the other two.
The one by Konstantin Zaitsev is not under development and hasn't been for a while.
The one by saem is the one that was forked by the the Nim org and that is being improved as part of the tooling roadmap.