You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
probably doesn't matter but here's my test file:
tests/nim/inim/t03_debugger.nim:
var g0 = 1234
proc fun()=
var a = 10
var b = @[1, 2, 3]
echo b
when defined(case1):
echo b[3]
echo "end_fun"
fun()
echo "end"
--debugger:gdb doesn't seem to work
also tried --debugger:gdb but that's even worse:
nim c --nimcache:/tmp/nim//nimcache/ -o:/tmp/nim//app -r --debugger:gdb -d:case1 tests/nim/inim/t03_debugger.nim
CC: timn_t03_debugger
CC: stdlib_system
Hint: operation successful (12180 lines compiled; 0.785 sec total; 16.254MiB peakmem; Debug Build) [SuccessX]
@[1, 2, 3]
/Users/timothee/git_clone/nim/timn/tests/nim/inim/t03_debugger.nim(11) t03_debugger
/Users/timothee/git_clone/nim/timn/tests/nim/inim/t03_debugger.nim(8) fun
/Users/timothee/git_clone/nim/Nim/lib/system.nim(2807) sysFatal
Error: unhandled exception: index out of bounds [IndexError]
Error: execution of an external program failed: '/tmp/nim//app '
The text was updated successfully, but these errors were encountered:
@Araq I don't think sysFatal is related; if I put a breakpoint before the line that causes sysFatal (echo b[3]), and press r, eval 1+2 still doesn't do anything
eval 1+2
o /tmp/z01.txt 1+2
probably doesn't matter but here's my test file:
tests/nim/inim/t03_debugger.nim:
also tried --debugger:gdb but that's even worse:
nim c --nimcache:/tmp/nim//nimcache/ -o:/tmp/nim//app -r --debugger:gdb -d:case1 tests/nim/inim/t03_debugger.nim
CC: timn_t03_debugger
CC: stdlib_system
Hint: operation successful (12180 lines compiled; 0.785 sec total; 16.254MiB peakmem; Debug Build) [SuccessX]
@[1, 2, 3]
/Users/timothee/git_clone/nim/timn/tests/nim/inim/t03_debugger.nim(11) t03_debugger
/Users/timothee/git_clone/nim/timn/tests/nim/inim/t03_debugger.nim(8) fun
/Users/timothee/git_clone/nim/Nim/lib/system.nim(2807) sysFatal
Error: unhandled exception: index out of bounds [IndexError]
Error: execution of an external program failed: '/tmp/nim//app '
The text was updated successfully, but these errors were encountered: