# Debugging the Project

The **Debug** is a tool designed to debug the execution of the current flow, view the received values stored in the nodes, examine the flow’s execution path, and troubleshoot problems in the flow’s implementation.

## How to work with Debug tool? <a href="#how-to-work-with-debug" id="how-to-work-with-debug"></a>

The Debug becomes available only after all errors are fixed, and your project is deployed.

To check the received values in a certain place in the flow, the user needs to select the required node, select the context menu, and select the Add breakpoint. The number of breakpoints in a flow is unlimited.

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FO24eWFfmWTspRSFI93G6%2FThe%20testing%20helper%20popup%20call%20button.png?alt=media&#x26;token=5e2ad09b-6069-4635-ac54-3ef1daaaa6ea" alt=""><figcaption></figcaption></figure>

To start debugging, click on **the Debug button.** It is located to the right of the Project Deployment button. The Test Helper pop-up window will open, and all the flows of a deployed project will be displayed on the left. Here you need to select the necessary flow and enter the required values ​​as request parameters. Next, click **the DEBUG button** to start the process.

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2Fs3uGZQGgipIXccIhlq2s%2FSaved%20tests%20_tab_Test%20helper%20PopUp%20(2).png?alt=media&#x26;token=7dea359b-5b6a-4885-8371-8a7edb21a79c" alt=""><figcaption></figcaption></figure>

You can use **the Download sample** <img src="https://processmix.com/wp-content/uploads/2023/03/Frame-669.png" alt="" data-size="line"> **icon** to get an example of a request that can be used to format or structure a request correctly.

{% hint style="info" %}
The Download sample icon is available only for complex REST flow structures containing elements of different types. For SOAP flow and Subflow, the button is always available.
{% endhint %}

When debugging requests for all REST flow methods, the **Headers** are additionally specified. They contain information about the request, such as data format, language, content type, and other settings. The Headers generated automatically from requests cannot be modified.\
For example:

* Content-Type: application/json. The application sends the requested content as data in JSON format.
* Accept: application/json. The application is waiting for a response in JSON format.

You can add a new header to the existing ones by clicking **the Add** <img src="https://processmix.com/wp-content/uploads/2023/07/Add.png" alt="" data-size="line">**icon**. An additional line will appear in the headers where you specify its name and value.

You can edit and delete headers you have created using the context menu options.

To **save** the debug test in the browser database, click on **the SAVE button.** In the opened pop-up, enter a name and a description of the debug test, and click on **the CREATE button**. A saved test will be displayed on the left side of the pop-up in the “Save tests” tab.

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FIVTr1vhx1u4K2SR0VthS%2FDebug_Test%20helper%20PopUp%20(3).png?alt=media&#x26;token=256dcf7a-af5e-4334-bf38-9973333506e7" alt=""><figcaption></figcaption></figure>

The last 10 unsaved tests are displayed on the left side of the pop-up in the “Last 10 not saved tests” tab.

The debugging process started and stopped at the first breakpoint, if there is one. You can see the current value of all variables during the execution of the flow in the Flows in the debug state section. All values can be edited, while debugging that adds flexibility to the process. On the left part of the Flows in the debug state section displays the node where the debug process is stopped. If the user has not added a single Breakpoint, the result of the entire flow is available to them.

{% hint style="info" %}
You can add additional breakpoints to the flow during the debug process.
{% endhint %}

Click the Run button on the bottom bar to run part of the flow up to the breakpoint and view the execution result. Also, by pressing this button, the user can execute from the current node to the next breakpoint. If the user is in the last node of the flow, then clicks the Run button, the debug will end.

Also, to complete the debugging, the user can click on the Stop button.

If the user has a subflow node in the flow, the user can switch to the internal flow by clicking on the Step into the button.

There are two ways to remove a breakpoint for a user.

**The first way**. In the ADE section, select the required endpoint, right-click to go to the context menu, then select Remove breakpoint.

**The second way**. The bottom panel contains the Breakpoints section. To do this, to delete all breakpoints, the user needs to click on **the Delete** <img src="https://processmix.com/wp-content/uploads/2023/03/Frame-1752.png" alt="" data-size="line"> **icon**.

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FjxY7usV0ccBJ5CFH7fqF%2FSection%20%E2%80%9CFlows%20in%20the%20debug%20state.png?alt=media&#x26;token=37c9f295-3dd5-491e-a376-78bc3a161f94" alt=""><figcaption></figcaption></figure>
