Accessed via FlxG.watch.

Constructor

new()

Methods

inlineadd(object:Dynamic, field:String, ?displayName:String):Void

Add a variable to the watch list in the debugger. This lets you see the value of the variable all the time.

Parameters:

object

A reference to any object in your game, e.g. Player or Robot or this.

field

The name of the variable you want to watch, in quotes, as a string: e.g. "speed" or "health".

displayName

Optional, display your own string instead of the class name + variable name: e.g. "enemy count".

addExpression(expression:String, ?displayName:String):Void

Add an expression to the watch list in the debugger. The expression gets evaluated with hscript, and you can see its current value all the time.

Parameters:

expression

A Haxe expression written as a string that will be evaluated and watched.

displayName

Optional, display your own string instead of the expression string: e.g. "enemy count".

Available since

4.1.0

.

addFunction(displayName:String, func:() ‑> Dynamic):Void

inlineaddMouse():Void

Add the mouse coords to the watch window. Useful for quickly getting coordinates for object placement during prototyping!

inlineaddQuick(displayName:String, value:Dynamic):Void

Add or update a quickWatch entry to the watch list in the debugger. Extremely useful when called in update() functions when there doesn't exist a variable for a value you want to watch - so you won't have to create one.

Parameters:

displayName

The name of the quickWatch entry, for example "mousePressed".

value

The new value for this entry, for example FlxG.mouse.pressed.

inlineremove(object:Dynamic, field:String):Void

Remove a variable from the watch list in the debugger.

Parameters:

object

A reference to any object in your game, e.g. Player or Robot or this.

field

The name of the variable you want to watch, in quotes, as a string: e.g. "speed" or "health".

removeExpression(displayName:String):Void

Remove an expression from the watch list in the debugger.

Parameters:

displayName

The display name of the registered expression, if you supplied one, or the Haxe expression that you want to remove, in string form.

Available since

4.1.0

.

inlineremoveMouse():Void

Removes the mouse coords from the watch window.

inlineremoveQuick(displayName:String):Void

Remove a quickWatch entry from the watch list of the debugger.

Parameters:

displayName

The name of the quickWatch entry you want to remove.