physics.setDebugErrorsEnabled()

Type Function
Library physics.*
Return value none
Revision Release 2024.3703
Keywords Box2D, internal, asserts, error
See also physics.getDebugErrorsEnabled()

Overview

This function allows extra physics errors to be caught by Box2D.

Gotchas

This feature is currently available only in the Corona Simulator for macOS.

Syntax

physics.setDebugErrorsEnabled( enabled )
enabled (required)

Boolean. Allow extra physics errors to be caught by Box2D.

Example

-- Toggle extra physics errors for debugging
if ( physics.getDebugErrorsEnabled() ) then
    physics.setDebugErrorsEnabled( false )
else
    physics.setDebugErrorsEnabled( true )
end