Skip to content

How to make SharePoint use debug scripts?

July 26, 2013

Recently I have setup a new machine and wanted to dig into some standard SharePoint scripts. The thing is that SharePoint has used all normal minimized scripts (sp.js, core.js) while I want it to run sp.debug.js and code.debug.js

To get the answer we need to get into the component called ScriptLink.

If your script is registered as ScriptLink (as most sharepoint scripts are), then the ScriptLink class can automatically use .debug. scripts if ScriptManager.iSDebuggingEnabled is true.

ScriptManager.IsDebugging enabled follows the following logic.

If there is <deployment retail=”true”> – return false.

Else if the script mode is not auto and not inherint, return (ScriptMode = Debug)


return what is set in <compilation debug=”xxx”…/>

So for developer farm the easiest thing to do is go to web.config and set there


<compilation batch="false" debug="true">


From → Uncategorized

Leave a Comment

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s

%d bloggers like this: