Can't run debug view on Windows Phone 8

Topics: Windows Phone 8
Apr 23, 2014 at 9:05 PM
Edited Apr 23, 2014 at 9:05 PM
var debugDraw = new CCBox2dDraw("fonts/MarkerFelt-22");
world.SetDebugDraw(debugDraw);
debugDraw.AppendFlags(b2DrawFlags.e_shapeBit);
debugDraw.AppendFlags(b2DrawFlags.e_jointBit);

public override void Draw()
{
 base.Draw();

 CCDrawingPrimitives.Begin();
 world.DrawDebugData();
 CCDrawingPrimitives.End();
}
I get exception: Additional information: BeginCustomDraw must be called before drawing anything.
How I can fix it?
Coordinator
Apr 24, 2014 at 8:27 PM
Start here:

https://github.com/Cocos2DXNA/cocos2d-xna/blob/master/tests/tests/classes/tests/Box2DTestBet(Box2D)/Test.cs
    public void InternalDraw(Settings settings)
    {
        m_textLine = 30;

        m_debugDraw.Begin();

        Draw(settings);

        m_debugDraw.End();
    }
The debug draw has a begin and end. That's where you begin and end the drawing of primitives from the debug draw.
    protected virtual void Draw(Settings settings)
    {
        m_world.DrawDebugData();

The test cases that we maintain are enormously helpful aides in understanding how the API works by example.