New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 803917 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Sep 27
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

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:
 
Labels: -OS-Linux
Cc: sc00335...@techmahindra.com
Components: -Platform>DevTools Platform>DevTools>JavaScript
Labels: Triaged-ET Needs-Triage-M63 Needs-Feedback
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!
https://jsbin.com/kubuges/edit?html,js

I'm using ubuntu 17.10, but I don't suppose that is relevant.
Project Member

Comment 4 by sheriffbot@chromium.org, Jan 22 2018

Labels: -Needs-Feedback
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

Comment 5 by kozy@chromium.org, Jan 22 2018

Owner: kozy@chromium.org
Status: Assigned (was: Unconfirmed)
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).
crbug-wrongvariable-2.png
63.7 KB View Download
Status: Fixed (was: Assigned)
It was fixed in most recent Google Chrome Canary. I believe acorn roll helped here.
Status: Assigned (was: Fixed)
I double checked with a little bit different expression and it looks like it does not work.
Status: WontFix (was: Assigned)
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