2 single: The Trace Library and the Interactive Debugger; Introduction
4 ==============================================
5 The Trace Library and the Interactive Debugger
6 ==============================================
8 In this chapter we will learn about the Trace Library and the Interactive Debugger
11 pair: The Trace Library and the Interactive Debugger; Loading the Trace library
13 Loading the Trace library
14 =========================
16 To start using the Trace library, We must load it first!
23 pair: The Trace Library and the Interactive Debugger; Trace All Events
28 The next example demonstrates the Trace library usage to trace all events.
35 see "Hello, world!" + nl
37 see "How are you?" +nl
41 new myclass { mymethod() }
44 see "Message from mytest" + nl
48 see "Message from mymethod" + nl
52 pair: The Trace Library and the Interactive Debugger; Trace control flow between functions
54 Trace control flow between functions
55 ====================================
57 The next example demonstrates the Trace library usage
58 to trace the control flow between functions.
76 return "test 3 output"
79 pair: The Trace Library and the Interactive Debugger; Pass Error
84 The next example demonstrates the Trace library usage
96 test2() # Runtime Error!
97 see "We can continue!"
100 pair: The Trace Library and the Interactive Debugger; Interactive Debugger
105 The next example demonstrates the Trace library usage
106 to use the Interactive Debugger
119 test2() # Runtime Error!
120 see "After Error!" +nl
121 see "t = " see t see nl
122 see "x = " see x see nl
125 pair: The Trace Library and the Interactive Debugger; Execute Program Line by Line
127 Execute Program Line by Line
128 ============================
130 The next example demonstrates the Trace library usage
131 to execute the program line by line!
144 see "After Error!" +nl
148 pair: The Trace Library and the Interactive Debugger; BreakPoint
153 The next example demonstrates the Trace library usage
154 to stop at a breakpoint!
165 see "After breakpoint!" +nl
167 see "End of program!" + nl
170 pair: The Trace Library and the Interactive Debugger; Disable BreakPoints
175 The next example demonstrates the Trace library usage
176 and how to disable the Breakpoints!
189 see "After breakpoint!" +nl
191 see "End of program!" + nl
194 pair: The Trace Library and the Interactive Debugger; Using the Interactive Debugger
196 Using the Interactive Debugger
197 ==============================
199 The next example uses a Breakpoint to open the Interactive Debugger!
212 see "After breakpoint!" +nl
214 see "End of program!" + nl
219 We have the Interactive Debugger at the Breakpoint!
221 .. image:: debugshot1.png
222 :alt: Interactive Debugger
224 We can print the variables values
226 .. image:: debugshot2.png
227 :alt: Interactive Debugger
229 We can change the variables values then continue execution
231 .. image:: debugshot3.png
232 :alt: Interactive Debugger
234 We can run the Interactive Debugger in the Output Window
236 .. image:: debugshot4.png
237 :alt: Interactive Debugger