Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I step through and debug a Scheme program using Dr. Racket?

I'm using the Dr. Racket development environment and the language definition #lang scheme to do work for a course. However, I'm not sure how to best use this tool for debugging. I would like to be able to execute a function and step through it, observing the values of different functions at various points in execution.

Is this possible? If not, what is the typical method of stepping through the execution of a Scheme program and debugging it?

like image 932
Thomas Owens Avatar asked Dec 24 '10 12:12

Thomas Owens


1 Answers

DrRacket includes a graphical debugging interface. Clicking on the Debug button will enable debugging mode. Now, hovering your mouse over any parenthesis will show a pink dot. Right-click on it and a context menu will appear with options to set break-points. Use Go, Step etc.. You can observe the stack and variables in the context in the side-pane.

See docs.

like image 121
dheerosaur Avatar answered Oct 06 '22 23:10

dheerosaur