Closed Bug 449766 Opened 16 years ago Closed 14 years ago

Variable value remains 'undefined' when stopped in a debugger before initialization

Categories

(Other Applications Graveyard :: Venkman JS Debugger, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: mstepanov, Assigned: rginda)

References

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1 Build Identifier: 2008070206 When script execution is interrupted by JSD (breakpoint or debugger keyword), a value of variable differs from uninterrupted case. Reproducible: Always Steps to Reproduce: 1. Open attached mootools_sample.html 2. Enable Firebug (1.2.0 or beta) 3. Set a breakpoint at line 15 (var index = selector.selectedIndex) 4. Press 'Test' button, Firebug suspends execution; see 'index' value as'undefined'. 5. Continue execution, see 'undefined' alert box. --- Repeat #1, #2 as above 3. Set breakpoint at line 14 (var selector = $("ab")). Repeat #4, #5 above; see '0' as value.
Blocks: 449452
Attached file Test case to reproduce
Status: UNCONFIRMED → NEW
Ever confirmed: true
There is this warning related, but I don't know if this is the cause: WARNING: Positioned frame that does not handle positioned kids; looking further up the parent chain: file /home/asrail/mozbuilds/hg.mozilla.org/comm-central/mozilla/layout/base/nsCSSFrameConstructor.cpp, line 7635
Confirmed on trunk, linux.
Version: unspecified → Trunk
This is filed under Venkman, but I fail to see the problem with current (SeaMonkey) trunk Venkman... And besides, setting breakpoint on "var index = selector.selectedIndex" will of course result in index being undefined, because the break will happen before the initialization...
IIUC, then without a debugger attachd, the alert() call outputs '0', but when you attach the debugger on line 15 and then continue, the alert() call outputs 'undefined'.
(In reply to comment #5) > IIUC, then without a debugger attachd, the alert() call outputs '0', but when > you attach the debugger on line 15 and then continue, the alert() call outputs > 'undefined'. That's my understanding as well, but I don't see this, using Venkman trunk with a SeaMonkey Linux trunk build...
Just tested with Firefox 3.6.13 and Firebug 1.6.2 - does not an issue anymore.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: