Description
Setting a breakpoint is a way to stop execution at a particular point in the code and enter the debugger. Then, commands like step continue finish and so on as in the following demonstration.
i1 : load "Macaulay2Doc/demos/demo2.m2"
|
i2 : code h
o2 = /usr/share/Macaulay2/
Macaulay2Doc/demos/demo2.m2:28:4-33:1: --source code:
h = t -> (
x := 1;
breakpoint y := t+1;
z := 1/t;
w := x+t;
)
|
i3 : h 1
/usr/share/Macaulay2/Macaulay2Doc/demos/demo2.m2:30:22:(3): entering debugger (enter 'help' to see commands)
/usr/share/Macaulay2/
Macaulay2Doc/demos/demo2.m2:30:16-30:24: --source code:
breakpoint y := t+1;
|
ii4 : step
/usr/share/Macaulay2/Macaulay2Doc/demos/demo2.m2:30:22:(3):[2]: unhandled step command
/usr/share/Macaulay2/Macaulay2Doc/demos/demo2.m2:31:11:(3):[2]: --stepping limit reached
/usr/share/Macaulay2/Macaulay2Doc/demos/demo2.m2:31:11:(3): entering debugger (enter 'help' to see commands)
/usr/share/Macaulay2/
Macaulay2Doc/demos/demo2.m2:31:5-31:13: --source code:
z := 1/t;
|
ii5 : finish
stdio:3:1:(3):[1]: --done stepping, returning to top level
|