Docs: update variable inspect

This commit is contained in:
AllenWriter
2025-06-25 00:06:52 +08:00
parent e2f6a212ee
commit 8d378d8350
2 changed files with 10 additions and 23 deletions

View File

@@ -1,37 +1,37 @@
---
title: Variable Inspector
title: Variable Inspect
---
The **Variable Inspector** 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.
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 Inspector automatically caches each node's input parameters and output results after execution. It provides the following key features:
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 Inspector, you can easily view and edit the latest output variables from any node to see how changes affect downstream nodes.
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 Inspector is located at the bottom of the canvas and updates in real time as the workflow runs.
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 Inspector 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.
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 Inspector. Click a variable to view its detailed content.
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)
@@ -51,7 +51,7 @@ Click a variables value to edit it. The updated value will be used by downstr
<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 Inspector to `SELECT username FROM users;` and re-runs only the database node. The system returns a list of usernames.
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" />
@@ -72,7 +72,7 @@ Click **Reset all** in the top-left corner to clear every cached variable at onc
### Supported Variable Types
The following types appear in the Variable Inspector. Some of them can be edited.
The following types appear in the Variable Inspect. Some of them can be edited.
| Type | Example | Description |
|-----------------------|-----------------------------------------|--------------------------------------------|