While debugging a function with spread syntax for rest parameters (ECMAScript 2015), an error is displayed in the tooltip instead of the parameter content
Reported by
philippe...@gmail.com,
Dec 22 2017
|
||||||
Issue descriptionChrome Version : 63.0.3239.84 OS Version: 10.0 Other browsers tested: None What steps will reproduce the problem? 1. Page with javascript method using spread syntax for rest parameter (ECMAScript 2015) 2. Insert a breakpoint via the developer tools in the function. 3. Hover the rest parameter in the function header or the destructuring spread syntax of the parameter in the function body. What is the expected result? The tooltip should display the same information as the one visible next to the funtion header (and also in the Scope pane) What happens instead of that? The tooltip displays "Unexpected token ..." Please provide any additional information below. Attach a screenshot if possible. Note: Rest parameter is newly supported by Chrome in version 47/49 according to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters UserAgentString: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36
,
Dec 28 2017
Thanks for filing the issue! @Reporter: Could you please provide sample test file/URL which helps us to triage the issue from our end.
,
Dec 28 2017
,
Jan 29 2018
You'll find an example attached to this post. In the Chrome developer tool, add a breakpoint at line #16, refresh the page (F5 key), and then the Watch pane, the Scope pane and the Console can display args content very well as expected, whereas the mouse hover of the variable name in the source code file (in the function declaration or in the function body) displays an "Unexpected token ..." error. As it is shown in the 2nd joined file.
,
Jan 29 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
,
Feb 23 2018
,
Mar 12 2018
,
Aug 15
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b8b5e2f2559605703324c35321a5031313590ffd commit b8b5e2f2559605703324c35321a5031313590ffd Author: Alexey Kozyatinskiy <kozyatinskiy@chromium.org> Date: Wed Aug 15 14:49:09 2018 [DevTools] fixed highlighting of expression with spread operator On pause when we get expression for popover we by mistake include spread operator when we should not. R=einbinder@chromium.org Bug: chromium:797296 Change-Id: I9a5eaa5df045874ec82056081e01e4c4a308ae87 Reviewed-on: https://chromium-review.googlesource.com/1041276 Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Reviewed-by: Joel Einbinder <einbinder@chromium.org> Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Cr-Commit-Position: refs/heads/master@{#583246} [add] https://crrev.com/b8b5e2f2559605703324c35321a5031313590ffd/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/popover-for-spread-operator-expected.txt [add] https://crrev.com/b8b5e2f2559605703324c35321a5031313590ffd/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/popover-for-spread-operator.js [modify] https://crrev.com/b8b5e2f2559605703324c35321a5031313590ffd/third_party/blink/renderer/devtools/front_end/sources/DebuggerPlugin.js [modify] https://crrev.com/b8b5e2f2559605703324c35321a5031313590ffd/third_party/blink/renderer/devtools/front_end/sources_test_runner/DebuggerTestRunner.js
,
Sep 21
,
Dec 10
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by krajshree@chromium.org
, Dec 26 2017