Skip to content

Commit e736f02

Browse files
committed
Document resume
1 parent db0b1f4 commit e736f02

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

debug/scribblings/debug.scrbl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,18 @@ debugging a higher-order function for example, you can try out the functions
7979
it accepts or creates with multiple sets of arguments to see how they react.
8080
}
8181

82+
@defproc[(resume [v any/c] ...) any]{
83+
Exits a repl created by @racket[debug-repl],
84+
returning the @racket[v]s from the @racket[(debug-repl)] expression as values.
85+
86+
For example in this function definition:
87+
@codeblock[#:keep-lang-line? #f]{
88+
#lang racket
89+
(define (f x y)
90+
(debug-repl))
91+
}
92+
On @racket[(f 1 2)],
93+
it will create a repl where @racket[x] is @racket[1] and @racket[y] is @racket[2].
94+
Then if you call @racket[(resume (+ x y))] within the repl,
95+
it will exit the repl and return @racket[3] as the result of @racket[(f 1 2)].
96+
}

0 commit comments

Comments
 (0)