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: ASP.NET, AJAX