Closed Bug 996456 Opened 10 years ago Closed 10 years ago

[jsdbg2] Page does not load correctly when debugger is enabled

Categories

(DevTools :: Debugger, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 998908

People

(Reporter: sebo, Unassigned)

References

()

Details

(Whiteboard: [firebug-p1])

Attachments

(1 file)

Test case:
1. Go to http://docs.sencha.com/extjs/4.2.2/extjs-build/examples/feed-viewer/feed-viewer.html
2. Press Ctrl+Shift+S to enable the built-in debugger
3. Reload the page

=> The page doesn't load correctly and the following error is thrown:

TypeError: d.el is null   ext-all.js:18

This bug was initially reported in the Firebug issue tracker[1] as it's also happening using Firebug 2.0b1.

Sebastian

[1] http://code.google.com/p/fbug/issues/detail?id=7359
I can repro this on OS X.

Also fails with javascript.options.baselinejit = false
Flags: needinfo?(jimb)
Status: UNCONFIRMED → NEW
Ever confirmed: true
I can reproduce this. I see two errors in the browser console:

ReferenceError: reference to undefined property arr[(arr.length - 1)] codemirror.js:6838
TypeError: d.el is null ext-all.js:18

The first one seems like it could be a bug to investigate.

We've taken steps to ensure that errors in the debugger server or UI won't affect the debuggee, but perhaps this error is somehow getting out and interrupting the debuggee's execution.
Flags: needinfo?(jimb)
Component: JavaScript Engine → Developer Tools: Debugger
Product: Core → Firefox
Brian, does this seem like something you'd be able to look into?
(In reply to Jim Blandy :jimb from comment #3)
> Brian, does this seem like something you'd be able to look into?

On first look, it doesn't seem to be caused by CodeMirror.  On the first reload, I see the same two errors:

ReferenceError: reference to undefined property arr[(arr.length - 1)] codemirror.js:6838
TypeError: d.el is null ext-all.js:18

But then on the second reload I see only the one error:

TypeError: d.el is null ext-all.js:18

This, combined with the fact that the error also happens in Firebug, makes me think that it is unrelated to the editor.  I can isolate this further by removing codemirror from the debugger frontend to confirm.  By the way, is there a way to enable debug mode on a page without opening the devtools frontend?
"Debug mode" just means that some debugger includes the global object (window) in its set of debuggees. If you take a look at this page (not yet linked to from the main page):

 https://developer.mozilla.org/en-US/docs/Tools/Debugger-API

the latter half has example code for setting up a Debugger with a content page as its debuggee. Note that it doesn't deal with iframes; each of the iframes' window objects needs to be added as a debuggee, or else the Debugger instance won't observe the execution of code in that window.
(In reply to Jim Blandy :jimb from comment #5)
> "Debug mode" just means that some debugger includes the global object

For clarity, I should have said:

"Debug mode" just means that some Debugger instance includes the global object (window) in its set of debuggees.
Another test case can be found at http://www.ariatemplates.com/.
There the carousel widget is not displayed when the debug mode is enabled.
FWIW there's also a related report[1] on the Firebug issue tracker.

Sebastian

[1] http://code.google.com/p/fbug/issues/detail?id=7378
This patch replaces the codemirror instance with a textbox.  I'm still seeing the following error along with content not showing up on reload when the debugger is opened with the patch applied:

TypeError: d.el is null ext-all.js:18
(In reply to Sebastian Zartner from comment #7)
> Another test case can be found at http://www.ariatemplates.com/.
> There the carousel widget is not displayed when the debug mode is enabled.
> FWIW there's also a related report[1] on the Firebug issue tracker.
> 
> Sebastian
> 
> [1] http://code.google.com/p/fbug/issues/detail?id=7378

I may not be looking at the right element, but I'm still seeing the carousel widget (with 'Easy class management', 'Powerful templating syntax', 'Mobile ready') upon reloading http://www.ariatemplates.com/ with the debugger opened.
(In reply to Jim Blandy :jimb from comment #5)
> "Debug mode" just means that some debugger includes the global object
> (window) in its set of debuggees. If you take a look at this page (not yet
> linked to from the main page):
> 
>  https://developer.mozilla.org/en-US/docs/Tools/Debugger-API
> 
> the latter half has example code for setting up a Debugger with a content
> page as its debuggee. Note that it doesn't deal with iframes; each of the
> iframes' window objects needs to be added as a debuggee, or else the
> Debugger instance won't observe the execution of code in that window.

When I addDebuggerToGlobal with scratchpad following the instructions at https://developer.mozilla.org/en-US/docs/Tools/Debugger-API#Example the problem does *not* occur on http://docs.sencha.com/extjs/4.2.2/extjs-build/examples/feed-viewer/feed-viewer.html.  In this case Firebug and DevTools are both closed.
(In reply to Brian Grinstead [:bgrins] from comment #9)
> (In reply to Sebastian Zartner from comment #7)
> > Another test case can be found at http://www.ariatemplates.com/.
> > There the carousel widget is not displayed when the debug mode is enabled.
> > FWIW there's also a related report[1] on the Firebug issue tracker.
> > 
> > Sebastian
> > 
> > [1] http://code.google.com/p/fbug/issues/detail?id=7378
> 
> I may not be looking at the right element, but I'm still seeing the carousel
> widget (with 'Easy class management', 'Powerful templating syntax', 'Mobile
> ready') upon reloading http://www.ariatemplates.com/ with the debugger
> opened.

Actually - the carousel does disappear when I follow the steps in a clean profile.  Same with http://docs.sencha.com/extjs/4.2.2/extjs-build/examples/feed-viewer/feed-viewer.html.
Might be related to bug 998908 which we discovered was somehow (?!?!?) caused by bug 978019.
Yeah this is fixed when I back out bug 978019. Dup'ing this to the other bug because it contains the bisect. Will copy over other test cases.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Whiteboard: [firebug-p1]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: