Accessed via FlxG.debugger.

Variables

@:value(false)drawDebug:Bool = false

Whether to draw the hitboxes of FlxObjects.

@:value(new FlxSignal())read onlydrawDebugChanged:FlxSignal = new FlxSignal()

Dispatched when drawDebug is changed.

@:value(3)precision:Int = 3

The amount of decimals Floats are rounded to in the debugger.

@:value([F2, GRAVEACCENT, BACKSLASH])toggleKeys:Array<FlxKey> = [F2, GRAVEACCENT, BACKSLASH]

The key codes used to toggle the debugger (see FlxG.keys for the keys available). Default keys: F2, ` and . Set to null to deactivate.

@:value(new FlxSignal())read onlyvisibilityChanged:FlxSignal = new FlxSignal()

Dispatched when visible is changed.

Available since

4.1.0

.

@:value(false)visible:Bool = false

Methods

@:value({ UpdateLayout : true, ToggleMode : false })addButton(Alignment:FlxHorizontalAlign, Icon:BitmapData, UpHandler:() ‑> Void, ToggleMode:Bool = false, UpdateLayout:Bool = true):FlxSystemButton

Create and add a new debugger button.

Parameters:

Position

Either LEFT, CENTER or RIGHT.

Icon

The icon to use for the button

UpHandler

The function to be called when the button is pressed.

ToggleMode

Whether this is a toggle button or not.

UpdateLayout

Whether to update the button layout.

Returns:

The added button.

inlineaddTrackerProfile(Profile:TrackerProfile):Void

Adds a new TrackerProfile for track(). This also overrides existing profiles.

Parameters:

Profile

The TrackerProfile

@:value({ UpdateLayout : true })removeButton(Button:FlxSystemButton, UpdateLayout:Bool = true):Void

Removes and destroys a button from the debugger.

Parameters:

Button

The FlxSystemButton instance to remove.

UpdateLayout

Whether to update the button layout.

inlineresetLayout():Void

Just resets the debugger windows to whatever the last selected layout was (STANDARD by default).

inlinesetLayout(Layout:FlxDebuggerLayout):Void

Change the way the debugger's windows are laid out.

Parameters:

Layout

The layout codes can be found in FlxDebugger, for example FlxDebugger.MICRO

track(ObjectOrClass:Dynamic, ?WindowTitle:String):Window

Creates a new tracker window if there exists a tracking profile for the class / class of the object. By default, flixel classes like FlxBasic, FlxRect and FlxPoint are supported.

Parameters:

ObjectOrClass

The object or class to track

WindowTitle

Title of the tracker window, uses the class name by default