If you’re creating or editing a JavaScript file in Visual Studio and you would like some help creating Client Object Model code, you’re not alone.
It’s a little bit cryptic, but we can tell IntelliSense to include any JavaScript libraries you have on your development machine.
Simply place the following two lines at the top of your source code (watch out for line breaks!):
/// <reference path="C:\\Program Files\\Common Files\\Microsoft Shared\\Web Server Extensions\\14\\TEMPLATE\\LAYOUTS\\MicrosoftAjax.js" /> /// <reference path="C:\\Program Files\\Common Files\\Microsoft Shared\\Web Server Extensions\\14\\TEMPLATE\\LAYOUTS\\SP.debug.js" /> /// <reference path="C:\\Program Files\\Common Files\\Microsoft Shared\\Web Server Extensions\\14\\TEMPLATE\\LAYOUTS\\SP.Core.debug.js" />
Then, you can get IntelliSense when you need it the most!
Full article on MSDN available here.
Enjoy!