<div dir="ltr">Hello,<div><br></div><div style>I like an idea of setting breakpoint and when it is reached during runtime dropping into the interactive shell. It's done in Python with pdb and in one of the Schemes (Gambit?). I tried, but I couldn't make anything similar for Racket.</div>
<div style><br></div><div style>At first I looked at namespaces and (read-eval-print-loop), but that didn't work. I could "load" the top-level module namespace, but I couldn't hook into the namespace inside the function (if it even exists as a namespace).</div>
<div style><br></div><div style>Then I tried to look inside the GUI debugger, and I realized that it uses a macro which inserts some function call before and after every expression. The debugger code was too hard for me to comprehend fully and I couldn't make it work the way I wanted, too.</div>
<div style><br></div><div style>It was some time ago, so sorry for the lack of specifics, but my question is: is it possible, and how, to do something like this in Racket:</div><div style><br></div><div style><div> (define (fun)</div>
<div> (define a 9)</div><div> (define b '(a b c))</div><div> (let</div><div> ([d display])</div><div> (set-trace))</div><div> (displayln "We're here!"))</div><div><br>
</div><div> (fun) ;; starts repl, where</div><div><br></div><div> > a</div><div> 9</div><div> >(d b)</div><div> (a b c)> (continue)</div><div> We're here!</div><div><br></div><div style>Thanks!</div>
</div><div><br clear="all"><div><div dir="ltr">Best regards,<div>Piotr Klibert</div></div></div>
</div></div>