We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

Verifying and Debugging SharePoint Code by Using ALM Features

By using IntelliTrace and unit testing, you can more easily debug your SharePoint applications and ensure that each method in your application works correctly. You can use these features for SharePoint projects in Visual Studio 2010 with Service Pack 1 (SP1) by following the same procedures as for other types of projects.

By using IntelliTrace, you can determine not only the current state of your application but also events that occurred in the past and the context in which they occurred. You can navigate back and forth to various points in time in your program where events of interest were recorded and review the states and values of variables at each point. You can also save the debugging session into a file, reload it later, and perform post-crash debugging. For more information, see Debugging with IntelliTrace.

You can more easily find errors in your code by performing unit testing, in which you write and run test code inside test methods. These methods contain empty variables and an Assert statement that you can use to verify the logic and functionality of your project based on the SharePoint object model. For more information, see Verifying Code by Using Unit Tests.



Walkthrough: Verify SharePoint Code by Using Unit Tests

Demonstrates how to create a unit test for a SharePoint project, run the test, and interpret the results.

Walkthrough: Debug a SharePoint Application by Using IntelliTrace

Demonstrates how to use IntelliTrace to find coding errors in a SharePoint project.