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

Issue 798469 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 4
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

devtool parses the "arguments" object when breaking in an arrow function

Reported by odedsa...@gmail.com, Jan 2 2018

Issue description

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

Steps to reproduce the problem:
1. create a code snippet with an arrow function
2. place a breakpoint within the function
3. either watch or use console to lookup "arguments"

What is the expected behavior?
Uncaught ReferenceError: arguments is not defined

What went wrong?
as seen in the screen capture both watch and console are able to parse an arguments object

Did this work before? N/A 

Chrome version: 63.0.3239.108  Channel: stable
OS Version: OS X 10.11.6
Flash Version: 

in runtime it meets the expected behavior
 
arguments devtool bug
343 bytes View Download
Screen Shot 2018-01-02 at 19.33.05.png
177 KB View Download
Labels: Needs-Triage-M63
Cc: vamshi.k...@techmahindra.com
Labels: Triageed-ET Needs-Feedback
Unable to reproduce the issue on reported chrome version 63.0.3239.108 and on the latest canary 65.0.3310.0 using Mac 10.13.1 with the below mentioned steps.
1. Launched chrome and opened dev tools
2. Navigated to Sources>Snippets>New snippet
3. Created the snippet using the file attached in comment#0
4. Placed a break point in the function.
5. Used console to look arguments

We observed the "Uncaught ReferenceError: arguments is not defined" is seen and it is not parsing the arguments. Attaching the screen cast of the same.

@Reporter: Could you please have a look at the screen cast and let us know if we have missed any steps in reproducing the issue. Any further inputs from your end helps us to triage the issue in a better way.

Thanks!
798469.mp4
929 KB View Download
you forgot to run the script and try this when the debugger stops on that breakpoint.
press that little play button on your bottom left side of the source code
Project Member

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

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "vamshi.kommuri@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
Labels: M-65 OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on reported chrome version 63.0.3239.108 and on the latest canary 65.0.3310.0 using Windows 10, Ubuntu 14.04 and Mac 10.13.1. As the issue is seen from M50(50.0.2661.0) considering it as non-regression and marking it as Untriaged. Attaching the screencast of 50.02661.0 and screenshot of 65.0.3310.0 for reference.

Thanks!
798469 M50.mp4
5.0 MB View Download
798469 M65.png
1.1 MB View Download
Owner: kozy@chromium.org
Status: Assigned (was: Untriaged)

Comment 7 by kozy@chromium.org, Jan 11 2018

I believe that it is feature and not a bug actually which allows you to easily inspect arguments which were passed to arrow function. I personally use it a lot.
How critical this issue to you?

Comment 8 by odedsa...@gmail.com, Jan 11 2018

since in runtime “arguments” aren’t available by definition, devtool can mislead devs to use arguments in their code. In my opinion, devtool should emulate actual runtime environment, thus the behavior is not aligned and should be regarded as bug.

Comment 9 by shiy2...@gmail.com, Apr 8 2018

A guy who uses Arrow function for the first time, it'll be confused while debugging code shown below:


(function () {

    var test = () => {

        debugger;

        console.log( arguments );    // Mouse cursor hovers at this `arguments`, DevTools will show `['b', 'c']`
    };

    test.call(null, 'b', 'c');

})('a');
Status: Fixed (was: Assigned)
It is fixed in current Google Chrome Stable and in latest ToT Chromium.

Sign in to add a comment