It took more work than I expected, but I’ve published my template for debugging the XNA Content Pipeline in XNA Game Studio 4.0.
To install and use the template, right-click on the solution node of a solution where you have an XNA Content project to debug, and select Add—>New Project… Then, in the Add New Project dialog, click Online Templates on the left-hand-side, and type “debugging” in the search box in the upper-right corner.
Select the XNA Content Pipeline Debugging template, and it will start the install wizard. The template is released under the Microsoft Public License. (When I submitted to the VS Gallery, I discovered that all submitted templates must be licensed under the Ms-PL.) If you don’t agree to the license, do not install or use the software.
After creating the project, there are two string constants that you must edit before you begin debugging. They are marked with comments, but I’ll describe it here as well.
Replace the highlighted value of this first field with the full path of the content project you want to debug:
private const string ProjectToDebug = @”TODO_FullProjectPathGoesHere“;
Then replace the highlighted value of this second field with the relative path of the item you want to debug. The path should be relative to the content project, so that it matches the item name in that project.
private const string SingleItem = @”TODO_RelativeItemPathGoesHere“;
Now when you want to debug, you set the DebugPipeline project to be the startup project and press F5. Or, even better, just right-click on the DebugPipeline project and select Debug—>Start new instance.
By default, this project is configured to build content for Windows using the Debug configuration and the HiDef graphics profile. These settings will be apparent in the Program.cs file where you can change them to meet your needs.
Changing the graphics profile to Reach is easy, and you might need to do this if your content project is part of a Windows Phone game.
HOWEVER, for now please don’t change the TargetPlatform (I just discovered a bug as I’m writing this… Damn!). I’ll update the template tomorrow to fix the problem.
If you have feedback or questions about the template, or want to review screenshots before downloading, follow this link to the template description page in the Visual Studio Gallery:
The link above has a discussion page.