I am currently developing a solution in C# with a feature that uses the SharePoint API to create a number of sites, lists, list views etc. The final result is going to be used on SharePoint Online. Necessarily, this involves many lines of code (about 650 at the moment). So uploading the solution to SharePoint Online for testing every time I change 5 lines of code isn't going to cut it. Between tests in SharePoint Online, I test against a SharePoint 2010 Standard environment with sandboxed code deployment activated.
On my last 200-line update, activation of my feature succeeds in the SharePoint 2010 Standard environment. However, in SharePoint Online, I get
Error
Sandboxed code execution request failed.
Troubleshoot issues with Microsoft SharePoint Foundation.
Correlation ID: 05d3094b-cc62-48e8-a289-a867cafbe4ff
Date and Time: 5/9/2012 2:13:08 AM
This shouldn't happen, since both environments use the sandboxed code service. Be that as it may, I need to find out what parts of my code violate the sandbox. Is there a better way of doing this than successively commenting out parts of my code and re-uploading the solution until it starts working again?
(Note: No exceptions are actually thrown during deployment. I have tried to log all exceptions to a SharePoint list in the site my feature works on, but no exceptions show up after I get this error message).