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">