New issue
Advanced search Search tips

Issue 815169 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 797296
Owner:
Closed: Dec 10
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Devtools: Highlighting ellipsis (rest parameter syntax) in debugger causes SyntaxError

Project Member Reported by jannh@google.com, Feb 23 2018

Issue description

Chrome Version: 64.0.3282.167 (Official Build) (64-bit)
OS: Linux

What steps will reproduce the problem?
(1) Save the following code to an HTML file:

    <script>
    function foo(...list) {
      debugger;
    }
    foo(1,2,3);
    </script>

(2) Open devtools.
(3) Navigate to the HTML file.
(4) In the source view in devtools, hover over `...list`.

What is the expected result?
A popup with the value of `list` should appear.

What happens instead?
A popup with a `SyntaxError` appears. (Screenshot attached.)


I believe that this is probably caused by devtools incorrectly assuming that the ellipsis is part of the argument name, causing devtools to attempt to evaluate "...list" as an expression.
 
devtools-ellipsis-argument-highlight.png
56.1 KB View Download

Comment 1 by jannh@google.com, Feb 23 2018

Labels: allpublic
Labels: OS-Chrome OS-Linux OS-Windows
Summary: Devtools: Highlighting ellipsis (rest parameter syntax) in debugger causes SyntaxError (was: Devtools: Highlighting ellipsis in debugger causes SyntaxError)
I suspect this is  Issue 797296 .

Comment 3 by alph@chromium.org, Mar 3 2018

Owner: einbinder@chromium.org
Status: Assigned (was: Untriaged)
Mergedinto: 797296
Status: Duplicate (was: Assigned)

Sign in to add a comment