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

Issue 672444 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

"Evaluate in console" for sourcemapped js files is misleading

Reported by eng.a7ma...@gmail.com, Dec 8 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36

Steps to reproduce the problem:
1.  enable js sourcemap support in devtools
2. use a webpack js app 
3. set a breakpoint in a source mapped file 
4. check this gif http://recordit.co/YZohvhqJTI

What is the expected behavior?
I expect:
1: (minor) to see the attr value on mouseover (the gif shows that object value is shown, but not on attr)
2:(major issue): if I select the source mapped code and use "Evaluate in console" the expression evaluates as expected

What went wrong?
this http://recordit.co/YZohvhqJTI

Did this work before? N/A 

Chrome version: 55.0.2883.75  Channel: stable
OS Version: OS X 10.12.1
Flash Version: Shockwave Flash 23.0 r0

if you can show the minified (actual) variable name on hover so that we can know which code to write on the console to test stuff according to the actual execution stack

bonus: do it automatically in "Evaluate in console" so that it spits the correct expression to the console
 
Labels: prestable-55.0.2883.75
Labels: M-55
Labels: TE-NeedsTriageHelp
Could some one from Dev tools can help us to triage this. Adding Needs triage help label.
Status: Untriaged (was: Unconfirmed)
Components: -Platform>DevTools Platform>DevTools>JavaScript
Labels: -TE-NeedsTriageHelp Needs-Feedback
Owner: kozyatinskiy@chromium.org
Status: Assigned (was: Untriaged)
Thanks for reporting.

I guess this is mostly a dupe of 327092 ..

Would you prefer that we disable "evaluate in console" if its a sourcemapped file?
We could do that...

Fixing variables is a longer term thing, but something we're working on.
You are welcome. I have like 10 more issues in a todo list waiting to be reported someday :D

yeah I think it's better to disable it instead of misleading developers who might not get the real reason their variables are undefined.

Sounds good. Let's disable it in these cases then. :)
Owner: kozy@chromium.org
Project Member

Comment 9 by bugdroid1@chromium.org, Dec 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0af72badfc47b8d2485fa07eaccbef9e8b4066dc

commit 0af72badfc47b8d2485fa07eaccbef9e8b4066dc
Author: Alexey Kozyatinskiy <kozyatinskiy@chromium.org>
Date: Fri Dec 08 02:33:40 2017

[DevTools] do not show "Evaluate in console" for file from source map

R=lushnikov@chromium.org

Bug:  chromium:672444 
Change-Id: I40a11fcaabaab0e58e8bda008c2fa5cbd79bc929
Reviewed-on: https://chromium-review.googlesource.com/815901
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522685}
[modify] https://crrev.com/0af72badfc47b8d2485fa07eaccbef9e8b4066dc/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js

Comment 10 by kozy@chromium.org, Dec 12 2017

Status: Fixed (was: Assigned)
Cc: susanjuniab@chromium.org
Status: Assigned (was: Fixed)
Tested this issue on Mac OS 10.12.6 using the latest Canary 65.0.3291.0.

As per comment #6 and #7 and the fix landed, the option 'Evaluate in console' should be disabled. But on the Latest Canary, we can still see the 'Evaluate in Console' option.
Attached is the screen cast for reference.

Hence reopening this CL.
kozy@ Can you please check and confirm the expected behavior and the fix.

Thanks..


672444.webm
2.4 MB View Download

Comment 12 by kozy@chromium.org, Jan 3 2018

Status: Fixed (was: Assigned)
You should use file with source map. There is no source map attached to version.js in your screencast.

Sign in to add a comment