---
schema_version: "1"
id: 1b1003b00da43291c7c5ab993390f8bb06fc0117fdbbae93241144c87b9c6d09
title: Evaluate DataWeave Expressions While Debugging
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/studio/evaluate-dw-expressions.md
canonical_url: https://docs.mulesoft.com/studio/evaluate-dw-expressions
source_site: docs.mulesoft.com
content_type: documentation
content_hash: c389b02cc091181ce6a4d08f11a8322a0c96dc12cbe5cc2511c4e971d6461ef2
description: MuleSoft Documentation Site
latest: true
---
---
product: Studio
---

# Evaluate DataWeave Expressions While Debugging

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Evaluate DataWeave expressions in the Studio debugger while your flow’s execution is paused. You can
evaluate a condition or inspect any message property at a breakpoint.

If your expression is a declaration, the debugger returns `boolean`. Otherwise, it returns the
value. For example, you can set:

- One expression to evaluate if the method for a request is `GET`:

  ```none
  #[attributes.method == "GET"]
  ```

- And another expression to inspect the payload of the message:

  ```none
  #[payload]
  ```

The first expression returns either `true` or `false`, while the second expression displays the
value of the payload at that particular breakpoint.

You can also save these evaluations as expression watches so that the debugger displays the result
of these evaluations every time the execution of your flow stops at a breakpoint.

## Evaluate a DataWeave Expression

1.  After the debugger stops the execution at your breakpoint, write the Dataweave expression in the
    **Evaluate DataWeave Expression** view, and select **Evaluate**:

    ![Debugger with message flow, listener, set payload, logger, and DataWeave expression evaluator with Evaluate Expression button](/mulesoft/current/en-us/studio/_images/evaluate-dw-expression.png)

    The result of the evaluation displays in the **Evaluate DataWeave Expression** view.

    ![A code editor displaying the method to set the payload and media type in DataWeave](/mulesoft/current/en-us/studio/_images/evaluation-result.png)

You can also edit the event properties or attributes:

1.  In the **Evaluate DataWeave Expression** view, right-click the property value or attribute, and
    select **Update value…​**:

    ![A contextual menu with options to navigate to the class, duplicate the expression, add the watch, or copy the value](/mulesoft/current/en-us/studio/_images/update-value-dw-expression.png)

2.  Edit the value and select **Set**.

    ![A window with an editing field and a Set button](/mulesoft/current/en-us/studio/_images/set-new-value-dw-expression.png)

## Add a DataWeave Expression Watch

To instruct Studio debugger to watch for an expression:

1.  In the **Evaluate DataWeave Expression** view, write your DataWeave expression, and select **Add
    to watch**:

    ![An arrow directs you to a button labeled ](/mulesoft/current/en-us/studio/_images/add-dw-expression-watch.png)

    Studio displays the new expression watch in the **Mule Debugger** view:

    ![A debugger window displaying a null payload](/mulesoft/current/en-us/studio/_images/show-expression-watch.png)
