Closed Bug 1336154 Opened 7 years ago Closed 4 years ago

Devtools incorrectly reformat function to one line.

Categories

(DevTools :: Console, defect, P4)

51 Branch
x86_64
Linux
defect

Tracking

(firefox51 affected, firefox52 unaffected, firefox53 affected, firefox54 affected)

RESOLVED WONTFIX
Tracking Status
firefox51 --- affected
firefox52 --- unaffected
firefox53 --- affected
firefox54 --- affected

People

(Reporter: matrix.org, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
Build ID: 20170125172332

Steps to reproduce:

Enter the following into the devtools console.

function f() {
    foo
    bar
    baz
}


Actual results:

The function gets displayed as "function f() { foo bar baz }".


Expected results:

The function should have stayed as originally inputted or been formatted "function f() { foo; bar; baz }" so that it is still correct.
Build ID: 20170206030211
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0

Reproducible on Windows 10 x 64 and Ubuntu 16.04 x64 on Firefox 51.0.1 and on Firefox Nightly 54.0a1.
Status: UNCONFIRMED → NEW
Component: Untriaged → Developer Tools: Console
Ever confirmed: true
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Tested in latest Nightly, and we now only show `function f()`.
I am not sure we should show the content of the function itself since you can have it by doing f.toString()). Also, we plan to have a button next to functions to jump to their definitions in the debugger.
Priority: -- → P4
Product: Firefox → DevTools
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.