In this tutorial, you will learn about loads of useful tips and tricks in order to help debug Sitecore CMS issues. This guide is a LIVING list of helpful troubleshooting tips to help you try and identify and resolve any Sitecore issues that you might encounter. Sitting in front of a computer tippy-tapping away, without knowing why something is broken can make you want to scream, or throw your computer out of a Window. If you currently find yourself in this situation, this checklist will hopefully help you resolve it. If this sounds good to you, read on 🔥🔥🔥
Check The Error Logs
- The logs are usually the first place you should check. These can be found here:
Data
➡ Logs
- Check the System logs within the Windows Event Viewer. You can access this tool here:
Control Panel
➡ Administrative Tools
➡ Event Viewer
Look in the Windows Logs
usually in Application
. Keep your eyes peeled with anything flagged with a red icon ❌
Start From A Clean Slate
Turn it off and on is now the world's go-to IT joke, however, it still holds true in CMS development world as it does to any other IT issue. My reset process in Sitecore looks like this:
Open your command prompt and type
IISRESET
Try to clean your Sitecore cache, by typing the following into your browser,
http://www.website.com/sitecore/admin/cache.aspx
Clean your temporary .NET file. In Windows these files can be found here:
C
➡ Windows
➡ Microsoft.NET
➡ Framework64
➡ v4.0.30319
➡ Temporary ASP.NET Files
Use Unlocker to delete the files. Do an IISRESET afterwards 😊
SiteCore Issues
Check that your post build config files contain everything you think they should. You can check the configuration of your Sitecore instance by typing
http://www.website.com/sitecore/admin/showconfig.aspx
into a browser.If the content is stale on your site, check if everything has been published. I normally implement a custom unpublished gutter component in my projects so I know what items are not published and which items are published quickly., You can learn how to implement this feature yourself in How To Display The Published Status Of An Item In Sitecore
If you have installed a Sitecore package recently and your site breaks, remove it. If you don't know how to remove a Sitecore package, I would recommend reading How To Uninstall A Sitecore Package
As Sitecore is yet to work with NuGet, there can often be times when certain files aren't deployed correctly, and wrong assembly versions exist on different servers. To make sure my files and config settings match, I use a folder comparison tool called Beyond Compare to check my published folder contains all the files I expect it to. A word of caution, Beyond Compare requires a license. If you want to use a free tool you can use Total Commander instead
SQL Issues
In some instances, when working with custom APIs and databases, you may want to double-check that the data coming in and out of SQL is what you expect. Using SQL profiler will allow you to see what stored procedure is being called and the parameters being passed in.
If you have the enterprise version of SQL, you get MS Profiler included (although you have to specifically include it when you install SQL). If you do not have the enterprise version of SQL there is also a free tool called Express Profiler. Simply point it at your database, instantly start recording, perform the web request and sort through the logs to see what's relevant to your issue.
Miscellaneous Issues
Using Chromes,
Inspect Element
➡Network
. Make sure all CSS, JS and web API requests are being loaded correctlySee if the issue is browser-specific by using different browsers
Clear your browser's
temp
filesTake a look inside third-party assemblies using a decompiler. If you get any form of error around not being able to find a method, class or interface you can open up the assembly on the server within your decompiler and look inside it. You can use Dotpeek for free 😊
Figuring out what files Windows is calling. Sometimes you may need to check if Windows is calling specific files, for example, you may have a scheduled task that needs to import images in a folder. In this situation, you can use Sysmon. Sysmon provides detailed information about what processes, network connections, and changes to the Windows file system are being made in real-time.
I feel very confident that if you follow all of these steps, you will be able to diagnose any Sitecore issue. Happy Coding 🤘