PDA

View Full Version : Firebug does not show all js files



1099511627776
16 Dec 2011, 9:45 AM
Hello world :)
I'm trying to debug Ext.js application with Firebug
I've made a simple Ext.application and some custom classes and put them into separate js files
When i open index.html in Firebird i see that those files are loaded and the main screen is shown correctly
but when i open scripts window in firebug there are no my custom objects only standard ExtJS files.

P.S. I'm using Dynamic loading
P.P.S. Made a small example like shown in "MVC Arhitecture" tutorial
and i can see the app.js in scripts window but no User.js, Edit.js and so on. BUT thay are loaded and processed normally.

mitchellsimoens
16 Dec 2011, 12:03 PM
Odd... I see tons of files in my script tab.

1099511627776
16 Dec 2011, 12:51 PM
I also see tons of files
but none of them are mine custom objects, just ExtJS and eval scripts

1099511627776
16 Dec 2011, 12:55 PM
For now i've reverted all changes i've made and now all works fine.
Reverted:
Ext.application({}) --> Ext.onReady({})
reverted directory structure
in index.html inserted script reference to all my custom objects

aneeson
11 Jan 2012, 3:56 AM
I just wanted to check if there was any update on this?

I find this to be a common problem when debugging an MVC application. Is it a bug with dynamic loading or do you have to reference your custom modules in a specific way?

When I use one of my objects:



this.displayArea = Ext.create(
'Ext.ux.dragscroll.form.field.TextArea',
{
height: 100,
readOnly: true
}


The code in Ext.ux.dragscroll.form.field.TextArea executes, however its JS file does not appear in FireBug (or IE's debugger).

I assume that the workaround of referencing the JS files from your HTML file is not the way an MVC app was intended to work. (that statement could be wrong, let me know if that's the case!!)

mitchellsimoens
11 Jan 2012, 5:22 AM
Not sure how many times I have to repeat this but the requires array property should hold all of the classes that class is using. In a controller, if you put classes in the views, stores, models, requires, those will be loaded. Ext.require will also load classes upfront. If you do it right (which isn't hard) then when you do the build with the SDK Tools, all of your application and Ext JS widgets will be included into the app-all.js file.

rufwork
4 May 2012, 11:12 AM
I'm having the same issue, and there's a thread on StackOverflow (http://stackoverflow.com/questions/8842126/debugging-extjs-4-in-firebug) about not being able to see your own JS files in Firebug when using ExtJS 4 as well. I do believe, as the OP implies, that dynamic loading has something to do with it.

As suggested on SO, Chrome's debugger shows everything -- go figure.