-add debugOut to test isInvadeBoundary=True isPhaseTrapped=True