Helpful Tips to Troubleshooting Umbraco Issues
Hey, finding and fixing bugs usually takes up about 60% of my time on a project. In today's tutorial, I'm going to cover a LIVING list of helpful troubleshooting tips to help you try and identify and resolve any Umbraco issues you might encounter. These tips are the ones any new Umbraco developer will typically need to run through before going to the Umbraco forum. If you can think of a tip that is not in this list, feel free to comment and I will add it to this running list.
- Check the Umbraco Logs for errors. The log files in Umbraco is a goldmine of information when it comes to debugging. Any exception the website throws will be logged within this table. If you are having problems with a page, a user control, macro or package this is the place to look. These logs can be found in the 'App_Data\Logs\' folder in your webroot, or, in the umbracoLog table in the database.
- If you are running Umbraco 7.5 onwards, run the health check tool. More information about that can be found in this post.
- Enable Mini-profiler to try and trace and profile what the current request is doing.
- Using Chrome’s Web Developer 'Network' tab to make sure all your CSS, JS and web API calls have loaded correctly.
- Use Visual studio to step through your code. You can do this by going to 'Debug' -> 'Attach To Process', and select the 'w3wp.exe'. Put a breakpoint by in your code and when you run the page, the breakpoint should hit.
- For older Umbraco issues, you might not be able to use mini-profiler. In these instances, you can show more debug information via the 'Debug' query string. If you are running your site in debug mode, you can add the 'umbDebug=true' query string to the end of any web request Url to show debugging information inside the rendered page. To enable/disable this, you the need to set the 'umbracoDebugMode' in the app settings.
<add key="umbracoDebugMode" value="true" />
- Clear your browser cache. On any web page if you Hit 12/or have the DevTools tab open. If you right click on reload icon at the top of the browser new option should be available 'Clear Cache and Hard Reset'.
- IISREST and clear temp internet files
- Download/create a clean install of Umbraco with the same version of your website. Use Beyond Compare to do a folder and file comparison to make sure you have all the assemblies and config sections Umbraco requires by default
- See if the issue is browser specific by using different browsers (IE, Firefox, Chrome).
- If the error is related to not being able to find a method, or an interface within your code, use Dot Peek to look inside the .dll and see which version of your code has been deployed. It is very common that the code that you assume should be deployed isn't and you need to re-deploy something.
- If you get an error about missing files, or an error after you have installed a new Umbraco package, re-install or remove all your packages to make sure that's not the issue.
- Clear your Cookies. In chrome's 'DevTools' -> 'Resources' -> 'Cookies', then right click on your website and select clear.