---
title: "Debugging and Testing an App | ThreatConnect"
slug: "debugging-and-testing-an-app"
description: "This article describes how to use the Live Debug feature to debug and test an App in the App Builder."
updated: 2024-05-01T15:31:51Z
published: 2024-05-01T15:31:51Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://knowledge.threatconnect.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Debugging and Testing an App

Once an App has been built successfully, you can debug and test it via the **Live Debug**function. Toggle the **Live Debug**slider at the top right of the [**App Builder**screen](/v1/docs/the-app-builder-screen) on to activate the live debugger (Figure 1).

WarningApp Builder debug mode should be used only in non-production ThreatConnect instances.

![Graphical user interface, application Description automatically generated](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-n20q88yk.png)

A successful build is required for the live debugger to work. If the App has not been built successfully, the **Live Debug**slider will be disabled and a message stating “Build required for pending changes” will be displayed when you hover over the slider.

In order to test an App, a [Playbook](/v1/docs/playbooks) that uses the App must be created. Click the **Generate a playbook to test this App** text (Figure 1). A new tab will open with a test Playbook in the [**Playbook Designer**](/v1/docs/the-playbook-designer)****(Figure 2).

![Diagram Description automatically generated](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-nw5rjkqx.png)

The test Playbook connects the new App to a [WebHook Trigger](/v1/docs/playbooks-the-webhook-trigger). Other [Triggers, Apps, and Operators](/v1/docs/parts-of-a-playbook) may be added as well. The **Edit App**pane allows you to view and test the input parameters that were created on the **App Builder**screen. The **wrench** ![](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-uuu1mked.png) icon at the upper-left corner of the App indicates that the App is in development.

Once the test Playbook is created, it will continue to exist, even if you close its browser tab or log out of ThreatConnect. Once you return to the App in the App Builder or toggle the **Live Debug** slider on again, the **App Builder**screen will provide a link to the test Playbook, as well as information on whether the Playbook is active or not (Figure 3). Click **Refresh** ![](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-3hlup1q6.png) to refresh the listing—for example, to show a change in status (active or inactive) or to display any new Playbooks that were created using the project.

![Graphical user interface, application, Teams Description automatically generated](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-lmd4meq8.png)

As demonstrated in Figure 2, the test Playbook can be used to view the App in order to verify the input parameters and the output variables. Enter information into the input parameters so that a test run of the App will have the required information for the App to work.

To view the App note****entered in the [**Metadata**tab](/v1/docs/metadata-tab), as well as the output variables and the current version of the App, double-click the App in the design pane to display the **Edit App**pane, and then click **Display Documentation**![Icon Description automatically generated](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-0p4fj7lz.png)****(Figure 4).

![Graphical user interface, application, Teams Description automatically generated](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-7ncczr1p.png)

You can also view a list of output variables by hovering the cursor over the **hashtag (#)** at the upper-left corner of the App in the design pane (Figure 5).

![Graphical user interface, diagram Description automatically generated](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-wu78wf47.png)

To begin the debugging process, the test Playbook must be active. Hover over the **Mode**dropdown menu in the upper-right corner of the **Playbook Designer** (Figure 2) and select **Active**. The Playbook will switch from **Design Mode** to **Active**(Figure 6).

![A picture containing graphical user interface Description automatically generated](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-sbxqq306.png)

If further information or changes are required in order to activate the Playbook, a message stating “Fix validation errors to enable activation” will be displayed when hovering over the **Mode**dropdown, and the **Active**option will be disabled. To view more details about the validation errors in the Playbook, click the red [**Validations**](/v1/docs/validations)****![Icon Description automatically generated](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-j7015dq2.png)****icon****in the side navigation bar of the **Playbook Designer.**

To execute the Playbook for debugging and testing, click **Execute Endpoint**![](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-bqf0ik3f.png)****in the box displayed at the upper-left corner of the **Playbook Designer**(Figure 6) while the Playbook is active.

Return to the browser tab with the **App Builder**screen, which will now display tabs that correspond to debugging functions (Figure 7).

![Graphical user interface, text, application Description automatically generated](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-s9x0vvlt.png)

## Debug Mode

When in debug mode, the [**Code Editor**](/v1/docs/code-editor)****becomes the **Debugger**tab. Use the icons at the top of the tab to orchestrate the debugging process:

- **Continue**![](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-41t2v02y.png): Click this icon to instruct the debugger to continue the debugging process, stopping only when a breakpoint is encountered or the program exits.
- **Step Over**![](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-tjkr4pyo.png): Click this icon to instruct the debugger to continue execution until the next line in the current function is reached or it returns.
- **Step Into**![](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-lvwqz0sj.png): Click this icon to instruct the debugger to execute the current line, stopping at the first possible occasion.
- **Step Out**![](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-cq1eyevd.png): Click this icon to instruct the debugger to continue execution until the current function returns.
- **Clear Breakpoints**![](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-hflobs4r.png): Click this icon to instruct the debugger to clear all breakpoints in the current session.
- **Update Global Variables**![](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-c1gq6u70.png): Click this icon to instruct the debugger to update all global variables for the App.
- **End and Exit**![](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-h5tcan3t.png): Click this icon to instruct the debugger to end the debugging session and exit the program.

NoteHover over each icon to display a tooltip that describes the icon’s function.

In addition to the **Debugger**tab, the **App Builder**screen displays a number of other tabs that provide information that can be used for debugging the App:

- **Usage**: This tab provides information on test Playbooks that use the App, including whether each Playbook is running and active.
- **Contents**: This tab is the same [**Contents** tab](/v1/docs/contents-tab) on the **App Builder**screen when live debugging is turned off.
- **Arguments**: Select the **Show standard parameters**checkbox to display a list of all of the standard parameters associated with an App and their values for the test execution of the Playbook. Standard parameters are a fixed set of parameters passed to all Apps and used by the software developer’s kit (SDK) to perform various low-level functions. They are available in this tab for troubleshooting, but are hidden by default.
- **Secure Params**: Click the **Additional Tabs**![](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-4yparcqe.png) icon displayed to the right of the **Arguments**tab and select **Secure Params**to switch to the **Secure Params** tab, which will list the arguments not passed during command-line execution, but retrieved securely in memory once the App is executing. Select the **Show standard parameters** checkbox to display a list of the parameters and their values for the test execution of the Playbook. To return to the **Arguments** tab, click **Additional Tabs**![](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-nwlc998n.png) again and select **Arguments**.
- **Breakpoints**: This tab displays a list of all the breakpoints in the debugging session, including the line number and file name. Breakpoints can be added at any executable line of code (i.e., not comments or empty lines). Toggle breakpoints by clicking on the gutter to the left of the line numbers for the code displayed in the **Debugger**tab. When a breakpoint is toggled on, a **breakpoint**![](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-tzh1kbnt.png) icon will be displayed to the left of the line number for the code, and the breakpoint will be added to the list in the **Breakpoints** tab. Click on the **breakpoint**![](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/debugging-and-testing-an-app-image-7sim2h3j.png) icon to remove it.
- **Variables**: This tab lists values for all variables in the current execution.
- **Call Stack**: This tab displays the program call stack for the line that is currently executing.
- **App Log**: This tab displays a log for the execution of the App.
- **Standard Output**: This tab displays the values of the output variables.
- **Standard Error**: This tab provides information about the errors that occurred during the execution.

ImportantThe App cannot be edited when the **App Builder** screen is in debug mode. The code in the **Code Editor** is presented in read-only format.

---

*ThreatConnect® is a registered trademark of ThreatConnect, Inc.*

20084-17 v.07.B
