From 27c6b5139f67cf07f4070724331c95961f01e4c0 Mon Sep 17 00:00:00 2001 From: Vincent Lee Date: Thu, 12 May 2022 18:39:08 -0700 Subject: [PATCH] Add support for debug server --- info.rkt | 1 + main.rkt | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/info.rkt b/info.rkt index 0ff3f17..e30ffb9 100644 --- a/info.rkt +++ b/info.rkt @@ -2,6 +2,7 @@ (define collection "r16") (define version "0.1") (define deps '("base" + "dbg" "racket-cord" "sandbox-lib" "slideshow-lib" diff --git a/main.rkt b/main.rkt index 467ebac..b989c94 100755 --- a/main.rkt +++ b/main.rkt @@ -2,6 +2,7 @@ #lang racket/base (require + (prefix-in dbg: debugging/server) (only-in racket/class new send) (only-in racket/cmdline parse-command-line) (only-in racket/format ~a) @@ -33,6 +34,7 @@ [module readable?])))] [storage path-string?] #:optional + [debugserver boolean?] [sandbox (config/c #:optional @@ -112,6 +114,9 @@ (vector-ref v 0) (vector-ref v 1))) + (when (hash-ref config 'debugserver) + (dbg:serve)) + (call-with-sandbox-conf (hash-ref config 'sandbox #f) (lambda () -- 2.38.5