From c29a0b0b96840c6d29de2e6e30d43a0e5309cd50 Mon Sep 17 00:00:00 2001 From: Mike Sperber Date: Wed, 4 Sep 2024 18:02:52 +0200 Subject: [PATCH] Add Debug button to #lang htdp/asl. Fixes #177. --- htdp-lib/htdp/asl/lang/reader.rkt | 3 ++- htdp-lib/htdp/bsl/reader.rkt | 10 +++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/htdp-lib/htdp/asl/lang/reader.rkt b/htdp-lib/htdp/asl/lang/reader.rkt index aea2dd1f0..40d0197e6 100644 --- a/htdp-lib/htdp/asl/lang/reader.rkt +++ b/htdp-lib/htdp/asl/lang/reader.rkt @@ -3,4 +3,5 @@ lang/htdp-advanced '(abbreviate-cons-as-list read-accept-quasiquote show-sharing - disable-stepper) + disable-stepper + enable-debugger) diff --git a/htdp-lib/htdp/bsl/reader.rkt b/htdp-lib/htdp/bsl/reader.rkt index 4378444d2..716579fa2 100644 --- a/htdp-lib/htdp/bsl/reader.rkt +++ b/htdp-lib/htdp/bsl/reader.rkt @@ -26,15 +26,19 @@ (define ((make-info options) key default use-default) (case key [(drscheme:toolbar-buttons) + ;; if you want to add more buttons, the strategy used here might not + ;; be the right one to use. If you can simply enable existing buttons, + ;; do that instead. (append (if (memq 'disable-stepper options) '() (list ((dynamic-require 'lang/private/sl-stepper-button 'sl-stepper-drracket-button) options))) (list (dynamic-require 'drracket/syncheck-drracket-button 'syncheck-drracket-button)))] [(drscheme:opt-out-toolbar-buttons) - ;; opt-out of all of the extra buttons b/c - ;; we don't want anything to confuse in the teaching languages. - #f] + (append (if (memq 'enable-debugger options) + '() + '(debug-tool)) + '(macro-stepper drracket:syncheck))] [(drracket:show-big-defs/ints-labels) #t]