Microsoft AJAX Extensions: Sys.Debug is null or not an object

One of the breaking changes which was made with the 1.0 release of the Microsoft Ajax Extensions was the renaming of the 'Debug' class to 'Sys.Debug' for reasons of compatiability with other frameworks. Breaking changes like this can often be a source of frustration, however today I was pretty glad that they renamed the class, as it helped me to troubleshoot issues with the awful MSI on a Vista development box.

The problem shows as a JavaScript error which states "Sys.Debug.IsDebug is null or not an object", basically telling you that something is using the wrong version of the Atlas JavaScript framework. The error is fairly common, and is often caused by cached copies of the JavaScript files - so for a lot of people, it can be solved simply by clearing the browser cache, or resetting IIS. However this didn't help with the box in question.

It turns out that even though I'd uninstalled and reinstalled the Ajax Extensions multiple times, the old JavaScript framework files were left on the box, and for some reason when reinstalling the product, the MSI didn't see fit to add the new ones. So I simply uninstalled, deleted what was left of the directory (most of the product actually comes off!), reinstalled, and all was well. If you're having the same issue, check the directory "C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025\MicrosoftAjaxLibrary\System.Web.Extensions\1.0.61025.0" (or the equivalent for your installation), and see if you have folders named "debug" and "release". If they exist, and there are .js files inside each of them, then delete them and reinstall - they're the old pre 1.0 versions.

This is what the contents of that directory should look like:

This seems to be the less common reason for the Sys.Debug error, and seems a pretty obvious thing to look at after having found it. However when your Programs and Features list shows up as having the right version, and you've uninstalled/reinstalled/rebooted/cleared cache many times, you don't always think to double check inside the actual directory to make sure that the installer is actually doing what it's supposed to. This is the second time in 2 weeks that I've had problems with a Microsoft packaged MSI. While I'm starting to feel like something of an expert at fixing problems like this, it never feels like an overly productive way to spend my time..

Tags: ,

Posted on Tuesday, May 22, 2007 9:26 PM | ASP.NET AJAX

Like this? Share it!

  • # Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 5/23/2007 8:55 AM

    How do these obscure problems with packaged MSI installers fit in with your comments to me last week of "Still, I'd rather be using nice slick DVD packaged MSIs than 'download your own' random quality distros"

    18

  • # Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 6/16/2007 2:42 AM

    Thank you sooo much for posting this ... I looked all over the web and after a few hours of trying out things, your solution actually worked for me!!

    Thnx

  • # Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 6/18/2007 8:47 PM

    Glad I could be of assistance Heidi!

  • # Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 7/18/2007 9:39 AM

    Thanks a lot ROSS..!!!!

    Its worked.

  • # Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 7/26/2007 10:16 AM

    Thank you ROSS. I spend 3 days in following up with other teams without any resolution. Finally, your solution worked.

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 9/19/2007 6:00 AM

    Finally... after 3 months of battling the problem, something that works. I think I would have your children for this one.

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 9/25/2007 9:36 PM

    Hurray!! Fixed the problem!! #

    Good post.

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 11/3/2007 6:25 AM

    Jipiaje Schweinebacke!

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 11/8/2007 2:18 AM

    Great post - solved my problems. Thanks!

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 12/14/2007 11:49 PM

    Great post. Many Thanks!

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 1/9/2008 3:54 PM

    Thank's alot ross..
    your solution very2 help me.

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 1/12/2008 4:43 AM

    If you're having the same issue, check the directory "C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025\MicrosoftAjaxLibrary\System.Web.Extensions\1.0.61025.0" (or the equivalent for your installation), and see if you have folders named "debug" and "release". If they exist, and there are .js files inside each of them, then delete them and reinstall - they're the old pre 1.0 versions.

    Yes I see these files like you are saying but when you delete them and Reinstall. What do you mean by delete them and reinstall? Mainly what do I need to reinstall? I understand the delete the Debug and Release folders part.

    Could you elaborate a little more so I do this correctly.

    Thanks so much

    Norm

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 1/14/2008 9:01 AM

    Hi Norm,

    Just delete those files/directories mentioned in the posting, and then reinstall the AJAX Extensions MSI.

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 1/18/2008 12:39 PM

    I enjoyed you article. The best part about it was that it worked!

    When I deleted and reinstalled that did not work

    but I did a delete, an uninstall restart iis then reinstall and it worked

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 9/13/2008 2:36 AM

    Great post.. solved my problem!! thanks for making my friday afternoon off to the pub

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 11/27/2008 5:17 AM

    Thank you...

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 12/31/2008 9:06 AM

    I also had some problems getting this to work the first time, but I had saved the old files inside of a folder called old, which I didn't move out of the Ajax folder structure. Once I deleted those old ones, did the uninstall, I saw the folder completely go away, did the restart IIS (just in case) and did the reinstall of Ajax everything was hunky dory.

    Good catch...

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 1/4/2009 4:06 AM

    thank you:)

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 1/5/2009 12:14 AM

    thank you

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 3/6/2009 4:29 AM

    thank you very much

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 3/7/2009 9:49 PM

    thank you..

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 3/8/2009 10:43 AM

    thnkssssssssssss

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 3/8/2009 10:44 AM

    thankssssssss

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 3/8/2009 10:45 AM

    thanksss youuu

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 3/19/2009 5:59 PM

    thank you kankaa.

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 3/29/2009 11:08 AM

    thanki..

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 4/4/2009 2:35 AM

    sagol babacan

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 4/12/2009 5:49 PM

    thank

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 5/15/2009 10:04 AM

    thankss..

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 7/2/2009 12:23 PM

    Thank ....

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 7/2/2009 12:28 PM

    Thank you

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 7/9/2009 3:05 AM

    thank you very much my friends..

  • # re: Microsoft AJAX Extensions: Sys.Debug is null or not an object
    Gravatar
    Commented on 9/5/2010 4:27 PM

    Thank you for comments

Post a comment
Please add 1 and 2 and type the answer here:
Remember me?
Ensure the word in this box says 'orange':