Open bkonyi opened 2 years ago
To meet the requirements here, we may be able to add a file selector to the eval console that defaults to the root library, but allows the user to select a different library if they want to. @rmacnak-google would that support the use case described here?
After https://github.com/flutter/devtools/pull/5248 lands, we'll have the ability to evaluate when the app is not paused, so that should get us part way there.
No. A file selector would allow evaluating in a chosen library*, but not in a chosen class, instance or frame.
(*Almost. The relationship from files to libraries is not quite a function because of shared parts.)
Since this issue has been labeled as about the debugger, I will focus on the case of frames. More fundamentally, the console is a broken debuggering UI because it makes all the per-frame operations like stepping or eval modal.
Observatory fixes this slightly making the display of source and local variables non-modal; eval is still modal but it is at least possible to select a frame in its console.
Hopscotch fixes this all the way: notice that a + b
evaluated in the second frame (and the affordence to step with respect to any frame).
As far as I can tell, it's only possible to evaluate an expression in the context of the current frame. While this is the most common use case, it should be possible to evaluate in the context of specific libraries, classes, and instances.
@rmacnak-google, feel free to add more details here if I missed anything.