Skip to main content

Debugging a prototype

Unexpected prototype behavior often comes from two features meeting: a variant that has no Click event, a layout that controls a layer's size, a preview session that keeps a changed value. Use the symptom table to find the rule, and the two consoles and the Variables panel to see what ran and what is incomplete. Also called: troubleshooting.

Find the cause by symptom

What you seeUsual causeWhere the rule is
A Click on a component does nothing in previewThe event sits on the default variant only, and the instance shows :hover whenever a mouse clicks itEvents belong to a variant
Nothing scrollsNo frame is Scrollable, or the Scrollable inner frame is set to Hug content on the scrolling axisNothing scrolls by default, Scrollable
A frame drags but ignores the wheel and the trackpadIt is Pannable, not ScrollablePannable
Draggable has no effectThe layer is an item of a Flex or Grid frame, and the layout decides where it sitsWith managed layout
A state variant never shows in previewIts suffix is not a state of the set's behavior, such as :pressed for :active or :checked on a ButtonNaming states, States per behavior
A state variant is missing from Change toThe set has a behavior, and the behavior switches the state variantsSet Component Variant
A checkbox, radio button or toggle starts in the wrong stateThe starting state comes from Checked, on the set or on the instance's rowChecked and the starting state
Radio buttons do not uncheck each otherTheir layer names differ, or they are not inside the same artboardRadio groups
An input cannot be picked in Set Component InputThe input is bound to no property, or it is a slotSet Component Input
Reset did not restore a variableReset covers one layer and never variablesReset
Set Variable is listed as missing a variableThe variable was switched to an expression or deleted, which empties the action's Variable fieldChanging or deleting a variable
An edit made in the editor does not show in an open previewThe session already changed that variable or that layer property, or the variable has a runtime value; it keeps its preview value until reloadVariables in preview
A Width or Height binding is goneThe axis was set to Fill or Hug content, or to a Left + Right, Top + Bottom or Scale constraint; layout sizing removes a size bindingWidth and Height
A component pasted from another document stopped respondingVariables do not travel: bindings are removed and Set Variable actions arrive without their variableRepairing a pasted interactive component
Typed text cannot be used in a conditionTyped text stays inside the field; no variable or expression can read itWhat a form can and cannot do
A shared link opens the start of the prototype, not where you wereThe address names the starting artboard and carries no statePages, artboards and the address

Debug console

Where: preview header → the terminal button (tooltip Debug console). The same button closes the side panel.

The preview header with the Debug console button on, and the Debug console below it after one click. An Event entry reads Click on the layer Add button. An Action entry reads Set Variable, with Variable count, Expression count + 5 and Result 45. The title shows the entry count 2, and Clear is beside it.

The console lists each event as it fires and each action it runs, in order, newest at the bottom.

  • An Event entry names the layer and the event. Check and Toggle add the State the click produced; the size-range events add Property, From, To and the Current value that was measured.
  • An Action entry follows for every action in the list, with its parameters as set in the editor: Target, Change to, Transition, Duration and so on. An empty target, variable, input, variant or condition reads Not set. A Set Variable with an expression adds Result, the value it assigned. The actions of a Conditional branch appear after the Conditional entry, so the entries show which branch ran.
  • No Event entry after a click: the layer, or the variant showing at that moment, carries no such event, or the event has no actions (→ Events belong to a variant). Bubbling shows as one Event entry per layer that carries the event (→ Order, bubbling and failures).
  • Hover a layer name or a Target value to highlight that layer in the preview.
  • State switches made by a component behavior, and the gestures of object behaviors, are not logged.

A Log entry is a warning about an expression in an action. It names the action type, not the layer, and shows nowhere else.

EntryMeaning
Log Set Variable, with the error text of the expressionThe expression failed, for example on a variable name that does not exist. The variable is unchanged (→ Set Variable).
Log Set Variable, The expression result does not match the variable's type.The expression ran, but its result is not of the variable's type. The variable is unchanged (→ Errors).
Log Conditional, with the error text of the expressionThe condition failed, and neither Then nor Else ran (→ Conditional).
note

The console records only while the side panel is open, on any of its views, and closing the panel empties the log. It keeps the last 200 entries; the number next to the title counts them, and Clear empties the log. The panel reopens with the preview when it was open before, so reload with the panel open to capture what runs on load.

Variables panel

Where: preview header → the braces button (tooltip Variables).

The panel lists every variable of the document, value and expression variables alike, with the value it has in your session at this moment. Another viewer's session has its own values (→ Variables in preview).

  • Values are read-only. To start a session from other values, set runtime values in the editor (→ Runtime values).
  • A row flashes when its value changes, whether a Set Variable action, an expression that re-evaluated or an edit in the editor caused it. Nothing marks afterwards which variables the session has changed.
  • A color shows as a swatch with its hex value. A long value is cut off; its tooltip has the full value.
  • A ! after the value marks an expression variable in error. The value shown is its last good one, and the tooltip has the error text (→ Errors).

Validation console

Where: editor → left toolbar → the console icon button, the last in the toolbar (tooltip Validation console).

The bottom of the left toolbar in the editor. The Validation console button, the last one, is tinted, and its list is open with two entries: Click event contains no actions, and Conditional action is missing a condition. Each names the page, the artboard and the layer.

The Validation console lists incomplete events, actions and object behaviors, and expression variables in error, before you open a preview. It does not check the expressions inside Set Variable and Conditional actions, and it does not check bindings; an empty list is not proof that everything works.

  • The button is tinted while the list has entries, and carries a red dot when entries were added since you last opened it. With nothing to report, a click shows No validation errors.
  • Each entry names the page, the artboard or component set, and the layer. Selecting it selects that layer, brings it into view and opens the Interactions tab, or the Settings tab for a behavior. An entry for a variable opens the Variables panel at that variable.
  • Entries follow your edits to events, behaviors and variables. The open list does not update; close and reopen it.
EntryMeaning
Click event contains no actions, for any eventThe event's action list is empty, so it does nothing.
… action is missing a targetTarget is empty, often because the target was deleted or moved (→ What an action can target).
Set Variable action is missing a variableVariable is empty (→ Changing or deleting a variable).
Set Component Variant action is missing a source componentChange to is empty.
Conditional action is missing a conditionIf is empty; neither branch runs.
Set Component Input action is missing an input, Resize action is missing both width and height, Open URL action is missing a URLInput, both size fields or URL are empty.
Draggable behavior is missing a handle objectHandle is set to Child object, but Object is empty; the layer cannot be dragged (→ Draggable).
Sortable behavior can only be applied to flex containersThe frame has no Flex layout; nothing sorts in preview (→ Sortable).
Expression error, Expression timed out, Circular dependency, Invalid value, Type mismatchAn expression variable failed and keeps its last good value (→ Errors).

In preview an incomplete action does nothing and the rest of its list still runs (→ Order, bubbling and failures).

  • How interactions run — what an action can reach, in which order lists run, and which variant's events apply.
  • Variables — what a preview session holds and when it follows the editor.
  • Preview — reloading to restart a session, and what the address carries.