I thought I'd share a very simple method of implementing a wireframe on/off toggle debug option.
You have a boolean instance variable named "wireframe" set to false initially, and an instance of the Xith3D CanvasPeer class named "cp".
in your event handling for whatever activates this debug option - add the code:
wireframe = !wireframe;
And you're done
This is nicer than using the command argument -DXITH3D_ENABLE_WIREFRAME_MODE=TRUE as it can be toggled, and much cleaner (not to mention faster) than using PolygonAttributes which a few other demos use.