Open Bug 1362432 Opened 5 years ago Updated 9 months ago

repeated function parameter is shown with wrong value in Scopes

Categories

(DevTools :: Debugger, defect, P3)

54 Branch
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: account-mozilla-bugzilla, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(3 files)

Attached file example.html
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0
Build ID: 20170418123106

Steps to reproduce:

1. Open attached example.html in Firefox 53.0 or Firefox Developer Edition 54.0a2 (both affected, new and old debugger!).
2. Open Developer Tools, go to Debugger.
3. Set breakpoint in line 10 (first line in function).
4. Reload to hit breakpoint.
5. Look at Scopes/Variables in debugger.
6. Click "resume".


Actual results:

- At step 5: Scopes/Variables window shows repeatedParameter with value "first" (wrong)
- After resume: Console shows output of "second" (correct)



Expected results:

- Debugger Scopes/Variables view should be consistent with runtime behavior: Show repeatedParameter with value "second"
Component: Untriaged → Developer Tools: Debugger
Version: 53 Branch → 54 Branch
Thanks for the report Daniel. I'll investigate soon
Product: Firefox → DevTools

Honza, could you try and reproduce?

Flags: needinfo?(odvarko)
Blocks: dbg-scopes
Whiteboard: [debugger-mvp]
Whiteboard: [debugger-mvp]
Attached file dbg_example.js

This appears to be a SpiderMonkey bug, rather than an issue with us stopping at the wrong bytecode, which I originally expected. It looks like Debugger.Object's eval and Debugger.Environment's getVariable both get the value of the first parameter rather than the second.

Flags: needinfo?(odvarko)
Blocks: dbg-api
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.