To enable debugging for a SharePoint site, there are three settings in the default web.config that need to be updated:
1.
SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false"
2. customErrors mode="Off"
3. compilation batch="false" debug="true"