devtool parses the "arguments" object when breaking in an arrow function
Reported by
odedsa...@gmail.com,
Jan 2 2018
|
||||||
Issue descriptionUserAgent: 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
,
Jan 4 2018
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!
,
Jan 4 2018
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
,
Jan 4 2018
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
,
Jan 5 2018
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!
,
Jan 9 2018
,
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?
,
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.
,
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');
,
Oct 4
It is fixed in current Google Chrome Stable and in latest ToT Chromium. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by krajshree@chromium.org
, Jan 3 2018