debugger doesn't automatically evaluate destructured variables
Reported by
davidmax...@gmail.com,
Jan 19 2018
|
|||||||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
Steps to reproduce the problem:
1. have code like this: let {tourId} = changes.value;
2. break on it
3. step over it
What is the expected behavior?
I expect the debugger to evaluate the variable I'm interested in, which is 'tourId', and display its value to the right of the code, highlighted in yellow
What went wrong?
It evaluates the 'changes' variable instead
Did this work before? N/A
Chrome version: 63.0.3239.132 Channel: stable
OS Version:
Flash Version:
,
Jan 22 2018
Thanks for filing the issue!! @Reporter: Could you please provide sample .js file to test this issue.Also please let us know on which OS you are facing this issue? This would help in further debugging of the issue. Thanks!
,
Jan 22 2018
https://jsbin.com/kubuges/edit?html,js I'm using ubuntu 17.10, but I don't suppose that is relevant.
,
Jan 22 2018
Thank you for providing more feedback. Adding requester "sc00335628@techmahindra.com" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jan 22 2018
,
Jun 8 2018
Actually, this seems to happen for non-destructured variables too, on occasion. I attach a screenshot as an example - crbug-wrongvariable-2.png In this case, on line 284, I really want to see what the value of 'flagValue' is, but instead it is showing me the value of 'propertyValue' (which is already evaluated on line 273).
,
Sep 26
It was fixed in most recent Google Chrome Canary. I believe acorn roll helped here.
,
Sep 26
I double checked with a little bit different expression and it looks like it does not work.
,
Sep 27
I spend some time debugging this. There are two points: - we use only local scope to lookup for variable value, so this magic does not work inside script by itself, only inside functions, - we show each variable not more then once. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by thomasanderson@chromium.org
, Jan 19 2018