> On Oct 29, 2015, at 10:01 AM, Marco Faustinelli 
> <marco.faustine...@onebip.com> wrote:
> 
> This question has been asked in 2012 and the fact that no reply has been 
> posted makes me think this is a dead track. But nevertheless...
> 
> I see that during a debugging session I can hover above an expression and 
> rightclick to send its value to the console or so set! it something else.
> 
> What I would like to do is evaluate complete expressions at will using the 
> current context where the debugger is. For example, type expressions and 
> commands in the interactions area and see immediately their value.
> 
> It is a basic functionality offered by all developer tools of all web 
> browsers. Does Racket feature it too?
> 
> I'd love to know how to do this because I am studying call/cc and it would be 
> very useful to experiment with current continuations by feeding them values 
> out of the debugging loop and watching what they do. 
> 
> The maximum I can get now is to see that cc => #<continuation> but that's 
> really of no help whatsoever.
> 
> Add here the fact that continuations are not examinable in the stepper and 
> soon you see that the assistance given by the environment is virtually none. 
> It's a pity. Am I missing something?

Short answer: no, I don’t think you’re missing anything. :)

Longer answer: evaluating *arbitrary* code while the program is halted would be 
difficult to reconcile with a compiled language. For instance, if my compiler 
has decided to inline a function, and in the debugger I alter the definition of 
this function, my compiled code is now invalid. It’s true that JavaScript can 
do this—essentially, JavaScript is so ludicrously hostile to compilers already 
that compiled code must (nearly) always assume that code can change 
dynamically, which makes evaluating arbitrary code at breakpoints no big deal.

About call/cc: stepper support for call/cc is theoretically possible. It’s an 
interesting problem. Essentially, the stepper would have to assemble the 
information that it has about the context into an internal representation of a 
continuation that would be rendered as a procedure. Somewhat fragile, but 
possible. Mutation would also be a thorny addition to the mix.

John Clements



-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to