summary refs log tree commit diff stats
path: root/examples/debugging.nim
blob: 89cdd3b2a6dcf9c1181272b104aabd795da371e6 (plain) (pre { line-height: 125%; } td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comm
# 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()