Noah Blumenthal's Blog

May 22, 2009

Debug is not defined (FireFox 3.0.10)

Filed under: Uncategorized — noahblu @ 6:15 pm

I spent a long time today trying to track down an issue whereby all my Javascript code worked in IE but none worked on Firefox (that’s a first!!!).

I found I kept getting the following error in the FF Javascript console:

Debug is not defined

of course always followed by lots of other errors. I found I had to add an empty Debug function in javascript above the rest of my code:

function Debug(){}

Quite a hack, huh?

I’m using Script# (http://projects.nikhilk.net/ScriptSharp/) to build much of my JS framework (I highly recommend) and it relies on this Debug object.

WTF?!?!

Advertisements

2 Comments »

  1. Check out the sscompat.js file in your S# install. That defines a lot of those things that IE has out of the box when you’re running on other browsers.

    I haven’t tried it, but I think all you need to do is include the JS and the block at the bottom will do the work for you.

    Comment by eric burke — May 27, 2009 @ 1:26 am | Reply

    • Sorry for the delay, but I _did_ try that and it worked great. Thanks a lot!

      Comment by noahblu — June 22, 2009 @ 4:59 pm | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: