dart /
webdev /
76c451755da98835bdd9358a803edbf307794e91 better scope detection and error handling in expression evaluator (#954)
* Fix scope detection and silence recoverable exceptions
- fix a bug in scope detection in ExpressionEvaluator to match the rest
of scope detection cases (skip all scopes beyond the one defining code
and dart variables)
- silence very verbose exceptions from expression evaluations, return an
error with message '<unknown>' to display as evaluation result and print
the exception details in verbose mode. Returning error to VSCode makes
sure we do not show internal errors during hovering over in the UI and
keep debug console clean. After most of the known cases of failures are
taken care of, we should consider adding error reporting guidelines to
the error.
- skip failing test due to an SDK update with a link to an issue to track
* Updated version
* Return errors as ErrorRef instead of InstanceRef from evaluateInFrame
- Return errors from ChromeProxyService.evaluateInFrame as ErrorRef so
they are not shown when hovering over source in the IDE
* Return ErrorRef from evaluateInFrame for compilation and reference errors
* Addressed CR comments
* fixed failing tests
7 files changed