DrRacket Debugger pause on error?

37 views
Skip to first unread message

Charles Rich

unread,
Oct 3, 2016, 10:15:50 PM10/3/16
to Racket Users
Hi all, Is there a way to get the DrRacket debugger to pause when then is an error, so that one can inspect the values of variables?

Since this debugger otherwise has similar capabilities to other common debuggers, such as in Eclipse, it seems like there ought to be a way, but I could not find it with documentation or experimentation.

Thanks, -CR

Jack Firth

unread,
Oct 4, 2016, 2:57:32 PM10/4/16
to Racket Users
I'm not sure about how to do this with the DrRacket debugger, but you can use `debug-repl`[1] from the `debug` package to basically set a breakpoint that opens a REPL you can use to inspect variables in. This works in both DrRacket and regular command line racket.

[1] http://docs.racket-lang.org/debug/index.html?q=debug#%28form._%28%28lib._debug%2Frepl..rkt%29._debug-repl%29%29

Charles Rich

unread,
Oct 4, 2016, 3:42:47 PM10/4/16
to Jack Firth, Racket Users
Hi Jack, Thanks for your reply. Setting breakpoints is not the
problem. The problem is to set things up so that when an *error*
happens, you end up in a paused state. You don't know in advance
where/when the error is going to happen. It might not always be at
the same location or every time that location in the code is executed.
(You can do this in many other debuggers).

Btw, entering a REPL when the error happens would be fine---it doesn't
have to be inside the GUI debugger.

-CR

-CR

On Tue, Oct 4, 2016 at 2:57 PM, Jack Firth <jackh...@gmail.com> wrote:
> I'm not sure about how to do this with the DrRacket debugger, but you can use `debug-repl`[1] from the `debug` package to basically set a breakpoint that opens a REPL you can use to inspect variables in. This works in both DrRacket and regular command line racket.
>
> [1] http://docs.racket-lang.org/debug/index.html?q=debug#%28form._%28%28lib._debug%2Frepl..rkt%29._debug-repl%29%29
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "Racket Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/racket-users/G7zZJ54dX1g/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to racket-users...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Dr. Charles Rich, Professor, Computer Science Department
Interactive Media and Game Development Program
Robotics Engineering Program
Worcester Polytechnic Institute, Fuller Laboratories B25b
100 Institute Road, Worcester, MA 01609-2280

Email: ri...@wpi.edu Phone: 508-831-5945 Fax: 508-831-5776
Home: http://www.cs.wpi.edu/~rich
Reply all
Reply to author
Forward
0 new messages