Contact Us

CATEGORIES

Whoops…Nothing found

Try other keywords in your search

Dump

 0 Minutes

 0 Likes

 7 Views

This article is about the dump function, which is particularly useful for displaying complete data structures, especially in Lua, where everything is stored in tables.


How to use

Whenever a variable contains not just a value but represents a table, it cannot be displayed using a conventional print statement.

local var = {"hello","world"}

pixc.log(var)

This will print only the memory address, but not the variable itself

  • table → The value being printed is a Lua table (Lua’s main data structure, similar to an array or dictionary).
  • 000001F5972D21C0 → This is the table’s memory address (an internal reference ID), not its contents.

To get a truly usable output, we have to iterate through the entire table and read out all values.

local var = {"hello","world"}

for i,n in pairs(var) do
	pixc.log(i,n)
end

In many cases, this can quickly become confusing, and it does not work if the table contains further tables. That is why there is the dump function, which recursively navigates through everything and outputs it as pretty print in the log.

This requires the “pixcHelper” library which includes the dump function

if self.helper == nil then
	require "pixcHelper"
	self.helper = createPixcHelper(pixc,self())
end

local var = {"hello","world"}

pixc.log(self.helper.dump(var))

This generates particularly attractive log prints across the data structure and is especially important for complex structures, as seen in this JSON example JSON Handling 


Autocomplete

The code editor provides integrated autocomplete functionality to assist in code development and reduce implementation errors.

This feature is referred to as “logDump”, Read More 


PIXERA 26.1  | 4. March 2026 | J.B.

Was this article helpful?