Debugging Your Sitecore Code

You might often find yourself in a situation when you need to debug your custom code. To do that, you should perform the common steps needed to debug a web application. This article will guide you through the steps needed to debug your application using Microsoft Visual Studio 2003.

For instance, we will debug the sample publish:end event handler.

  1. Set a breakpoint in Visual Studio
  2. In Visual Studio menu select Tools >> Processes and attach to the aspnet_wp.exe process (if you have Windows XP the name of the process may vary depending on your Windows version).
    attach process
  3. Wait for your code to get executed. In this example we will trigger the publish:end event.
  4. Proceed with the debugging as usual.