Dumpio

Dokumentace

Setting the type field gives you a specialized rendering. Without a recognized type, the content still shows as an interactive JSON tree (type data), so type is always optional.

How the type is determined

The viewer classifies each dump into one of 14 kinds. It reads type first, with a few heuristic fallbacks for common cases:

Type Recognized when
var type is var and value is an object
model type is model
collection type is collection
table type is table
measure type is measure
performance type is performance
event type is event
mail type is mail
html type is html
trace type is trace
exception type is exception, or an exception / error / stack / stackTrace / trace key is present
sql type is query, or an sql field is present
http type is http, or a method or url field is present
log type is log, or a level field is present
data anything else — the generic fallback

Ray-style types (model, collection, table, measure, performance, event, html, mail, and var) are recognized only by an explicit type — no guessing from the shape of the data — so that, for example, event and log can't collide.

Each kind has its own icon, color label, filter tab, and metric badges.

var — variable dump

A structured, type-aware dump of a live value (the output of dump() from the PHP library).

  • Reads value (the serialized node tree), optionally label, language (php / node / python / go, shown as a badge), and caller ({file, line, function}).
  • caller becomes a clickable jump-to-editor link.
  • The tree understands the kinds: object, array, map, set, string, int, float, bool, null, undefined, resource, callable, ref (cyclic reference). Objects show the class name and property visibility (+ public, # protected, - private). Trimmed branches get an orange "truncated" label.

sql — database query

  • Reads sql (string), bindings (array), and time (ms).
  • Formats the query, colors the time by thresholds (> 1000 ms red, > 100 ms orange, else green), and in the Interpolated section substitutes real values from bindings for ? (nullNULL, numbers and booleans directly, strings quoted).

http — HTTP request

  • Reads method, url, status, headers, and body.
  • The status is colored by range (≥ 500 red, ≥ 400 orange, else green).
  • The Copy cURL button assembles a curl command from the method, URL, headers, and body.

log — log line

  • Reads level, message, and optional details.
  • level drives the color badge (error → red, warning → orange, info → blue, debug → …).
  • In the detail, the content renders as a generic JSON tree — log differs from data by its icon, color, filter tab, and level metric, not by a custom layout.

model — ORM model

  • Reads class (or model), attributes, relations, connection, and exists.
  • attributes renders as a key/value table, relations as a tree, and exists becomes a "persisted" / "new" badge.

collection — collection

  • Reads items (or data) and count.
  • If every item is a flat record, it renders as a table with columns derived from the union of keys; otherwise as a tree.

table — table

  • Reads columns and rows. Rows can be arrays (aligned to columns; without given columns the headers are filled in as #0, #1, …) or records.

measure — measurement

  • Reads name, time (or duration, ms), memory (bytes), and context.
  • The time is color-graded, and memory is shown in readable units.

performance — performance

  • Reads metrics (object), breakdown (an object of ms numbers, rendered as a stacked bar), and context.
  • Metric values are auto-formatted by key name: memory / bytes / size → bytes, time / duration / latency / ms → milliseconds, cpu / usage / percent → percentages.
  • A memory snapshot from the PHP library (Dumpio::memory()) arrives as a performance dump with current / peak / limit metrics, rendered as byte tiles.

event — event

  • Reads event (badge), entity, entity_id (or entityId), actor, data, and metadata.

trace — call stack

A dedicated view of the call stack (backtrace) sent by Dumpio::trace() from the PHP library.

  • Reads frames (an array of frames). Each frame can carry function, class, type, file, and line.
  • Each frame renders as Class->method() with a clickable file:line link for jump-to-editor. The library's own frames are stripped, so you see only your code.

html — HTML preview

Renders foreign HTML inside a fully isolated iframe (no scripts, no same-origin, no forms) under a strict Content-Security-Policy.

  • Reads html (string) and optionally text, and uses message as the title.
  • Remote resources (tracking pixels, external CSS and fonts) are blocked by default; a "Load remote resources" toggle enables them for that dump.
  • Tabs: Preview (rendered), Text (the text part), Source (the source HTML).

mail — email preview

The same isolated preview as html, plus an email envelope header.

  • Reads html, text, subject (also the title), from, to, cc, bcc (each accepts a string or {name, address} / {name, email}) and attachments (an array of {name, size, mime}).
  • The header shows subject / from / to / cc / attachments; the body has HTML / Text / Source tabs.

raw — unparseable input

You don't send it on purpose — Dumpio creates it internally when it receives input it couldn't parse as JSON. It shows the parser error and the original text. See Dump format.

data (default)

Every dump without a recognized type renders as an interactive JSON tree with:

  • copying the path to a node (e.g. user.roles[0].name) and the value,
  • clickable URLs (they open in the browser),
  • full-text search within the tree with a regular-expression toggle and expand/collapse all.

Repeat counts

If the content carries count > 1 (from the SDK's count() deduplication helper), both the list and the detail show a ×N badge instead of repeating the row.