What is Inspect mode?
Complex and large modules make testing and understanding what is happening in the module difficult. Inspect mode allows authors to inspect their modules quicker and easier: they can trace the execution of their modules, simulate the execution of integrations, and provide mock data for database nodes.
As the authors proceed, they can see a record of the data that has been entered so far in their Inspect session. If required, they can switch between building and inspecting, picking up where they left off in their Inspect session.
❗ Please note: integrations, email sends, and database nodes are not executed in Inspect mode.
Why is Inspect mode useful?
Inspect mode is useful in a variety of scenarios: from the developing and testing stage to when authors are ready to present to colleagues, customers, or clients. Inspect mode allows to switch between module building and previewing swiftly and seamlessly, enabling authors to detect and eliminate problems early on. This is especially useful when modules become longer and more complex.
How to use Inspect mode
As a default, any module appears in Build mode, the regular editor interface. In order to enter Inspect mode, you will need to select the 'Inspect' tab at the top of the editor pane.
Inspect will then enable and open Inspect mode. This is indicated by the 'Inspect' tab turning from grey to blue. You can switch back and forth between Build and Inspect mode freely.
Selecting Inspect triggers the following:
- A so-called debug session is created (or resumed, if one is in progress already)
- The sidebar splits into two areas:
- Top area: 'Inspect preview' shows the current input of the Inspect session
- Bottom area: 'Session data table' shows the current Inspect sessions' data
When you interact with the Inspect preview, the module will be presented as it would usually. However, the path – which is dependent on the selections made in the preview module – will be highlighted in green. In other words, the different nodes along the path are highlighted to indicate that they were passed through on the way to the result node.
You may notice that it is not possible to click and select any of the nodes that are not highlighted. However, you can click on any of the previous, highlighted nodes in the path to be taken to that part of the session. This allows you to change data and examine its effect on the pathway.
You can also select a row in the session data table that will then take you to the corresponding node.
Selecting a transition will show you what conditions were met to trigger this specific path.
When a node has no Inspect interface, the previous input node will be displayed.
In the Session overview below the preview sidebar, you will find three buttons. Selecting the first button with a file icon you can save your session or open a new one.
The second button is the 'Session Manager' button where you can review, manage and monitor your saved Inspect sessions.
The third button is the 'Preview from here' button and allows you to open a full-screen preview starting from the node that is currently shown in Inspect preview.
Auto-generate mock inputs
When using Inspect mode, some features differ from a published module:
- Email actions will not send emails
- Integrations will not execute
- Case databases cannot be read from or written to
When these nodes are encountered in Inspect mode, an author must specify placeholder data to use for this Inspect session, simulating what would be returned by these nodes. Sometimes you may wish to proceed quickly through a module to test its flow rather than being concerned with the accuracy of data in these nodes. In these cases, using auto-generate by clicking on the magic wand to create mock inputs is an easy and quick way to inspect your module.
❗ Please note: If you wish to test emails, integrations and databases, you must publish to an environment such as TEST or LIVE.