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)

  1. Change the racket file you want to trace into full racket version. Go to Language -> Choose Language -> Choose The Racket Language
  2. Put the cs135-trace.rkt into the same directory with the file you want to trace
  3. Add (require "trace.rkt") on the top of the file be traced
  4. Change the function define/trace for example trace_example.png
  5. Write an expression: for example: (f 5)
  6. Click run, and then you could see the each step of the function in the interaction window, you would see:

the > means deeper level of the stack

-- Ariel L - 2020-12-23

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng trace_example.png r1 manage 65.9 K 2020-12-23 - 14:19 KurtDietrich Example program for tracing
PNGpng trace_output.png r1 manage 73.8 K 2020-12-23 - 14:22 KurtDietrich Example output from cs135-trace.rkt
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2020-12-23 - KurtDietrich
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback