Closed Bug 722231 Opened 12 years ago Closed 7 years ago

First step in for (key in obj) is undefined when using Debugger

Categories

(Core :: JavaScript Engine, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: sebo, Unassigned)

Details

Please try the test case of http://code.google.com/p/fbug/issues/detail?id=2828#c2.

Steps the reproduce the problem are:
1. Open Firebug on the test case page
2. Enable and switch to the Script panel and there to the Watch side panel
3. Reload the page
   => JSD will stop at the debugger; keyword (line 7)
4. Step over two times

=> The script execution will halt at line 10 ("result += 1;") instead of line 9 ("if (obj.hasOwnProperty(key)) {") and "key" will be undefined. If you continue stepping, you'll see, that it isn't looped through all keys of "obj" as expected.

Honza also asked at the mozilla.dev.platform:
https://groups.google.com/d/topic/mozilla.dev.platform/nw75ZAFIVwY/discussion

Sebastian
This is still a problem in JSD2.

Tested in the DevTools debugger and Firebug 2.0.1 in Firefox 33.0a1 (2014-07-15).

Sebastian
Summary: First step in for (key in obj) is undefined when using JSD → First step in for (key in obj) is undefined when using Debugger
Assignee: general → nobody
The test case seems to be gone now.
Do you remember what it was?
Flags: needinfo?(sebastianzartner)
The test case is still available at http://storage.googleapis.com/google-code-attachments/fbug/issue-2828/comment-2/Issue%202828.htm, though it works as expected now, i.e. tepping two times halts at line 9 and the "key" variable is set to "a".

Therefore I finally close this issue now. Thanks for pinging me about this, Tom!

Sebastian
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Flags: needinfo?(sebastianzartner)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.