This blog post describes how you can add a button to the ribbon in the Content Editor application of the Sitecore ASP.NET CMS to debug the selected item in the current database.
This is a repost of http://sitecorejohn.spaces.live.com/blog/cns!960125F1D4A59952!189.entry.
Update 2.April.2013: See Add Debug Command to Content Editor in the Sitecore ASP.NET CMS.
The Sitecore browser-based debugger by default opens the home item of the managed Web site in the Web database. If you want to debug another item, you can navigate to that item, or enter its URL. If you want to debug in another database, you can add the sc_database query string parameter.
Or, to add a button to the Content Editor ribbon to debug the selected item in the selected database:
This procedure overides an existing system command to operate at the item level. After step 2, the default Debug command on the Sitecore menu will take you to the Master database instead of the publishing target database (Web).
Download the prototype code.