Debugging ECMAScript in SharePoint 2010

One of my favorite new features of SharePoint 2010 is the ECMAScript object model

OK, the .NET and Silverlight client object models are also neat but they don’t come close to the ECMAScript object model. And don’t even get me started on “Sandboxed solutions” – they are great but WHY would you use a sandboxed solution when you can do even more with client side scripting?

So since I think it is so great, I want to tell you how to change the scripts from being “minified” to readable.

SharePoint ships with debug versions of all scripts.  If you read this article on MSDN, you're told:

“You can override this default setting and use the debug .js files by adding <deployment retail="false" /> to the system.web section of the web.config file, which is located in the %inetpub%wwwrootwssVirtualDirectories80 directory.”

Not so fast… if you do this, you will see an error because the “deployment section” is marked as “MachineOnly” in machine.config.

You can read an old bug report here: http://connect.microsoft.com/VisualStudio/feedback/details/104338/deployment-section-definition-incorrectly-marked-machineonly-in-shipping-machine-config

So what you have to do is to open up your machine config and remove the attribute:

allowDefinition="MachineOnly" from <section name="deployment" type="System.Web.Configuration.DeploymentSection

Happy debugging!

SharePoint Online

The cloud parts are functional components that extend your SharePoint Online environment in Microsoft 365.

Supports Classic and Modern sites for SharePoint Online/Microsoft 365

SharePoint

Top SharePoint Online Products

Experience greater power and savings by bundling our SharePoint apps and cloud parts.


Calendar Plus


Chart Plus


Knowledge Base


Project Management Central


Simple List Search

 

On-Premises Only

These web parts extend SharePoint beyond its out-of-the-box capabilities by tailoring it to your requirements with Bamboo Solution’s growing portfolio of SharePoint Web Parts.

SharePoint 2013, 2016, 2019 – Classic Pages Only

SharePoint

Top On-Premises Only Products

Experience greater power and savings by bundling our SharePoint apps and web parts.


Calendar Plus


Data Viewer


Password Change


Password Expiration


Password Reset

 

Featured Services

SharePoint Health Check

A SharePoint Health Check will identify the causes of issues and risks associated with your specific environment, and is custom tailored to provide you with the best recommendations to optimize your SharePoint environment.

SQL Health Check

Document recommendations relating to performance, stability, availability, or a specific focus you request of your SQL Server database instances.

My SharePointXperts

The truth is that each SharePoint skill may not be a full time job for many organizations, and it is nearly impossible for one person to do everything you need – so augment your team with SharePointXperts; providing the skill sets you need when you need them!