I have code and objects which work great in Firefox, and blow up in IE. I don''t have an object inspector in IE comparable to Firefox''s Firebug and am contemplating finding a function call to layout an object in text format so I could read it from my own debug console. I''m considering using a function to convert the object to JSON for display. What other solutions might be better? Sam _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Sam, How about trying something like the following - for( var myVariable in window ) { document.write( myVariable + '' = '' + window[myVariable] + ''<br>'' ); } The above code outputs all properties/methods of the window object. So, you could put in your object in place of "window" and inspect it? Does this help? Let me know. Thanks, Mandy. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Not sure if this is what you are looking for or not but I''ve been using this Logger http://gleepglop.com/javascripts/logger/ with a fair amount of success. It doesn''t format that well in Safari and doesn''t position correctly at first in IE but getting past that it works great. It has an inspect function with it that I actually use quite often. On 8/14/06, Sam <sam.google-Uc2IQQBAS6sAvxtiuMwx3w@public.gmane.org> wrote:> > > I have code and objects which work great in Firefox, and blow up in IE. I > don''t have an object inspector in IE comparable to Firefox''s Firebug and am > contemplating finding a function call to layout an object in text format so > I could read it from my own debug console. > > I''m considering using a function to convert the object to JSON for display. > > What other solutions might be better? > > Sam > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >
Short of finding a full debugging tool for IE (VS.NET or VWD supply this but may not work well for your project) or creating your own robust object inspector, I''d say simply serializing your object like that in JSON is about the quickest way to get the debug info you really need. On 8/14/06, Sam <sam.google-Uc2IQQBAS6sAvxtiuMwx3w@public.gmane.org> wrote:> > I have code and objects which work great in Firefox, and blow up in IE. > I don''t have an object inspector in IE comparable to Firefox''s Firebug and > am contemplating finding a function call to layout an object in text format > so I could read it from my own debug console. > > I''m considering using a function to convert the object to JSON for > display. > > What other solutions might be better? > > Sam > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Sam, How about trying something like the following - for( var myVariable in window ) { document.write( myVariable + '' = '' + window[myVariable] + ''<br>'' ); } The above code outputs all properties/methods of the window object. So, you could put in your object in place of "window" and inspect it? Does this help? Let me know. Thanks, Mandy.