Status: Accepted
Owner: [email protected]
Labels: Type-Bug Priority-Medium

New issue 212 by [email protected]: Unable to mutate (local) variables  
from debugger
http://code.google.com/p/v8/issues/detail?id=212

It is not possible to change the value of local variables and arguments
when debugging. Using the evaluate/print command 'print a=1' changes a if
its a global variable but not if it's a local variable or an argument to
the function on the stack frame where the evaluation takes place.

This is a known limitation in the way the debugger currently works. When
evaluating in a stack frame a new context is created for the evaluation. In
this context all the arguments and local variables are added and a function
for the evaluation is compiled an executed in this context - using eval as
part of it.. When the evaluation is done this context is thrown away. As
this debug evaluation context is linked into the normal context chain
changes to global variables works fine. Writing back changes in the debug
evaluation context to the stack frame should be straight forward, but
handling the case where the value of the argument or local variable is
already in a register at the point of the break might make this a bit
harder to get right. Also using the arguments[...] syntax in the debugger
might be problematic.




--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to