Given the following file testme.nim:
proc test3(): string =
## Returns a string. Could be nil!
echo "Test3 is going to be very bad!"
proc test2() =
echo "This is test2"
echo test3()
proc test1() =
echo "This is test1"
test2()
when isMainModule:
test1()
I compile and run with the embedded debugger and when I run I get the expected crash:
$ nimrod c --debugger:on -r testme.nim
...
*** endb| testme.nim(14) testme ***
*** endb| >>run
This is test1
This is test2
Test3 is going to be very bad!
Traceback (most recent call last)
testme.nim(14) testme
testme.nim(11) test1
testme.nim(7) test2
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
Error: execution of an external program failed
However the execution ends. I was expecting the debugger to leave me at the frame which crashed so I could poke variables and inspect stuff. How does one use the embedded nimrod debugger in such cases?