summary refs log blame commit diff stats
path: root/examples/debugging.nim
blob: 89cdd3b2a6dcf9c1181272b104aabd795da371e6 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                     
# Simple program to test the debugger
# compile with --debugger:on

proc someComp(x, y: int): int =
  let a = x+y
  if a > 7:
    let b = a*90
    {.breakpoint.}
    result = b
  {.breakpoint.}

proc pp() =
  var aa = 45
  var bb = "abcdef"
  echo someComp(23, 45)

pp()