CS135 Trace
Path
You could find the cs135-trace.rkt here:
~/web/content/assign/dr_racket/cs135-trace.rkt
How to use it
We use it for debugging (this is helpful in office hour)
- Change the racket file you want to trace into full racket version. Go to Language -> Choose Language -> Choose The Racket Language
- Put the cs135-trace.rkt into the same directory with the file you want to trace
- Add (require "trace.rkt") on the top of the file be traced
-
Change the function define/trace for example
![trace_example.png](/twiki/pub/ISG/Cs135-trace/trace_example.png)
- Write an expression: for example:
(f 5)
-
Click run, and then you could see the each step of the function in the interaction window, you would see:
![](https://cs.uwaterloo.ca/twiki/pub/ISG/Cs135-trace/trace_output.png)
the > means deeper level of the stack
--
Ariel L - 2020-12-23