---
title: Variable Inspect
---

The **Variable Inspect** is a panel located at the bottom of the workflow editor. It captures the input and output data of each node after execution, helping developers quickly identify issues and verify data flow throughout the workflow.

## Why It Matters

[Variables](/en/guides/workflow/variables) act as key connectors between nodes and enable dynamic flow control. In workflow applications, variables store user input as well as outputs from each node — such as LLM responses, tool results, conversation context, and environment parameters.

The Variable Inspect automatically caches each node's input parameters and output results after execution. It provides the following key features:

- **Real-time variable monitoring**: Captures and displays all variables right after a node runs, including workflow inputs and outputs.
- **Edit cached variables**: Lets you manually change most variable types without re-running upstream nodes — ideal for testing different scenarios.
- **Abnormal data tracking**: Displays the actual value and type of each variable, making it easier to identify format issues, missing fields, or type mismatches.
- **Global state management**: Displays all variables in a single panel, including system variables, environment variables, and custom-defined node variables.

With the Variable Inspect, you can easily view and edit the latest output variables from any node to see how changes affect downstream nodes.

## How to Use

The Variable Inspect is located at the bottom of the canvas and updates in real time as the workflow runs.

After a node runs, its output variables show up in the panel so you can quickly inspect or edit them.

![](https://assets-docs.dify.ai/2025/06/38f26d7339f64abfdfb6955b1c34f4ae.png)

The following is an example of how to use the Variable Inspect in an "external database query" application. In this workflow, an LLM node receives natural language input, translates it into SQL, sends the query to a remote database, and retrieves the data.

> Click [here](https://assets-docs.dify.ai/2025/06/ac4da5ed5506f8a34aae7f0b88323f37.yml) to download the DSL workflow file.

### Viewing

Once a node is executed, its output variables automatically appear in the Variable Inspect. Click a variable to view its detailed content.

![](https://assets-docs.dify.ai/2025/06/94a4741c25204db5fd1281ec475093d9.png)

### Editing

Click a variable’s value to edit it. The updated value will be used by downstream nodes during the next run.

<Info>
    Editing variable values here does not affect the cached data in the node's “Last run” record.
</Info>

**Example:**

<Steps>
  <Step title="Default Result">
    The user inputs “Show all user data,” and the LLM node generates `SELECT * FROM users;`. The database correctly returns all data.
    <img src="https://assets-docs.dify.ai/2025/06/dcf4b0048bf1ed802369ab10731a4848.png" />
  </Step>
  <Step title="After Editing the Variable">
    The user manually modifies the SQL in the Variable Inspect to `SELECT username FROM users;` and re-runs only the database node. The system returns a list of usernames.

    This allows the user to test new data by re-running only the downstream database node without restarting the entire workflow.
    <img src="https://assets-docs.dify.ai/2025/06/fb8c49fc0c8c63866f1a9379e8752d9e.png" />
  </Step>
</Steps>

### Revert

Click the revert icon at the top-right of the variable edit field to restore the variable to its original value.

![](https://assets-docs.dify.ai/2025/06/b713290543a0feb95ecab65336e97483.png)

### Reset All Variables

Click **Reset all** in the top-left corner to clear every cached variable at once.

{/*

### Supported Variable Types

The following types appear in the Variable Inspect. Some of them can be edited.

| Type                  | Example                                 | Description                                |
|-----------------------|-----------------------------------------|--------------------------------------------|
| **System Variables**   | sys.query, sys.user_id, sys.conversation_id | System-provided runtime context            |
| **Environment Variables** | OPENAI_KEY, SECRET                    | Values from environment configuration       |
| **Custom Variables**   | [user-defined name], uploaded file      | Inputs defined in the Start node or uploaded by the user |
| **Node Output Variables** | output, structured_output, usage, loop_variable, iteration_variable | Outputs generated by each node             |

*/}

{/*
Contributing Section
DO NOT edit this section!
It will be automatically generated by the script.
*/}

---

[Edit this page](https://github.com/langgenius/dify-docs/edit/main/en/guides/workflow/debug-and-preview/variable-inspect.mdx) | [Report an issue](https://github.com/langgenius/dify-docs/issues/new?template=docs.yml)

