Look at the bottom right window in each case.
Here, you see all three arguments

Here, you only see the two used args

Good find, @Pacane
This is probably working as intended because the asynchronous body is actually a closure and we aren't capturing unused parameters
@mhausner
It's quite unexpected when you're unaware of that implementation detail though.
@Pacane Agreed it can be surprising. We could probably adjust the implementation so that unused parameters are always captured, but, if the code doesn't ever reference a variable why would you need to inspect it in the debugger? It cannot affect the outcome of the code being executed.
@johnmccutchan I think it's just about dev experience – not so much when debugging a working app, but when you're getting started. Understanding what you're getting passed in from the framework, etc.
That's correct, I practice what I call DDD (debugger driven development).
As a serious note, it's pretty much what @kevmoo said. When you try a new
lib/framework, it's likely that you don't know what's the API, and what's
easier than try/run it to figure out.
On Wed, Dec 21, 2016, 14:09 Kevin Moore, notifications@github.com wrote:
@johnmccutchan https://github.com/johnmccutchan I think it's just about
dev experience – not so much when debugging a working app, but when you're
getting started. Understanding what you're getting passed in from the
framework, etc.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dart-lang/sdk/issues/28177#issuecomment-268612626,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AComyDNcn4b0k_22yBkN0aVvxrQbuu1eks5rKXmDgaJpZM4LTQvd
.
Even listing out the unused variable as In an async function, unused argument values are not visible – just so folks like @Pacane don't think they are going crazy
I'm sure I reported this a few years ago already.
When you investigate the current status at a breakpoint then the values in scope are relevant and helpful even when they are not used in a closure and usually help to understand why an application reached the current status.
Also not showing getters is really painful when investigating the status.
@johnmccutchan is right. The variables are not showing up because they are not captured. You don't want them to be captured because you don't want to pay the overhead of captured variables unless it's necessary. As @zoechi says, this has been reported before. However, it does not make sense to pay the runtime overhead to maintain info just for the debugger.
Could the debugger know what variables were captured or not? If so, it'd be
great to have some sort of message saying the variable can't be inspected
since it's not used/captured.
On Wed, Dec 21, 2016, 17:41 Matthias Hausner, notifications@github.com
wrote:
@johnmccutchan https://github.com/johnmccutchan is right. The variables
are not showing up because they are not captured. You don't want them to be
captured because you don't want to pay the overhead of captured variables
unless it's necessary. As @zoechi https://github.com/zoechi says, this
has been reported before. However, it does not make sense to pay the
runtime overhead to maintain info just for the debugger.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dart-lang/sdk/issues/28177#issuecomment-268662765,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AComyGguW0vmZp3M6RfITOBLaPkdWkJVks5rKar-gaJpZM4LTQvd
.
I think the issue is stale. If you still care about it please leave a comment - we can evaluate if something can be done.
Most helpful comment
It's quite unexpected when you're unaware of that implementation detail though.