You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@bkonyi is there an existing way to get at the return value for a function through the VM Service?
In JS, when you step over a return, there's an extra stop location at the return which includes the return value in the variables list:
js.mp4
In Dart, it seems we have a similar extra stop location (it jumps to before the return keyword):
dart.mp4
However, I can't see anything in the VM traffic that indicates the return value so I'm not sure if the reason for this extra stop point was for this reason, or something else.
I'm not aware of any way to do that, otherwise it would have already been available alongside the list of other local variables.
We probably have a step location there since we're about to perform the return after evaluating a + b. If we didn't have that location, we'd simply skip past return in a function that returns void.
This does seem like nice behavior, but we'd need to make service changes. It's probably worth filing an issue for this in the SDK, but I don't think it'll be high priority.
In JS you can see the Return value of different operations in the debug panel in the "Return value"
I would like to be able to do the same in Dart.
So instead of this
We could make this
More info:
https://stackoverflow.com/questions/47200659/watching-return-values-in-visual-studio-code
Thanks
The text was updated successfully, but these errors were encountered: