Hello everyone, i just started using the content pipeline tool and i must say it’s a wonderful addition to the monogame package. Referencing the latest GitHub version i had many crashed or contents unable to build and i would like to give my contribution to fix thoose issues, but i seem to be unable to debug correctly into the exceptions.
My current setup is as follows, starting from the Monogame.Framework.Windows.sln using VSPro2012:
added project reference to MGCB from Pipeline
created a new configuration for x86 (wanted to use debug and continue where possible) copied from (Any Cpu)
The results are as follows:
launching the Build command doesn’t break into the code of MGCB at set Breakpoints
MGCB throws error in output window but won’t break to show exception
If i turn on Debug Mode app crashes with exception 6100 and asks to connect a debugger (wich displays exception at line 41 of Program.cs
// Launch debugger if requested.
if (content.LaunchDebugger)
System.Diagnostics.Debugger.Launch(); <- Exception
First off, you should use the AnyCPU configuration for MonoGame, MGCB and your content pipeline projects.
You can bug by opening the project in Visual Studio then running MGCB with the /launchdebugger parameter. This will open a debugger popup where you can select your visual studio instance.
What I am usually doing, is to place a System.Debugger.Lunch() or Break() inside the Processor and run the pipeline tool build (or mbcg). If you have the Processor project already open in VS it will ask you to attach the debugger on the existing VS instance instead of opening a new one.
I don’t think you need to build the pipeline/mgcb or check the debug box from pipeline. That will break inside mgcb.exe, not inside the processor.
pipeline.exe will spawn mgcb on a new process. That’s probably why you don’t see the breakpoints hit.
OK, so in another thread, a developer suggests running MGCB from visual studio, but what I’m missing there is how to add my custom processors. I can’t see how to add a .mgcb file to the Tool’s project, and owing to the messy implementation of the XNA code I’ve inherited, I’m not sure how to bring my processors over to the Tool’s project.
I’m done for today. I’ll try to figure this out again tomorrow, thanks nkast.