tp.Debug

tp.Debug is a small development-time helper for inspecting values while writing demos, controls, and application code. It is intentionally simple: it converts values to readable text, writes values to the browser console, and can display a visible note when the UI notification helper is loaded.

Calling tp.Debug(Value) is shorthand for tp.Debug.Log(Value). tp.Debug.AsText(Value) returns text suitable for objects and primitive values. tp.Debug.Show(Value) uses tp.InfoNote() when available and falls back to console.info(). This is not the old tp.Log mechanism and it does not require a page-level log element.

Convert to text

Use tp.Debug.AsText() when a value must become readable text before it is shown in a page log or note.

Write to console

tp.Debug() and tp.Debug.Log() write to the browser console. The demo mirrors the same text below so the result is visible.

Show a visible note

tp.Debug.Show() is useful when the result should be visible without opening DevTools.

Handle difficult values

Circular objects cannot be serialized as JSON. tp.Debug.AsText() handles that case and returns a safe fallback text.