# How to debug a Kanban

To debug kanbans you can use the Debug Console.

{% hint style="info" %}
Debug Console is available only for the kanban owner, or users with the Flexi Kanban Admin permission set.
{% endhint %}

Click on Kanban menu <img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FnnUM4s07gTfTzkzCs12g%2Fimage.png?alt=media&#x26;token=ad23b791-6500-4848-b240-ec08c11dc9ed" alt="" data-size="line">and select "**Debug Console**" item:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FPVDPYiULK1AGVNYZd8lg%2Ffile.excalidraw.svg?alt=media&#x26;token=6cc380f2-4a71-4c69-9d81-84de82765368" alt="" class="gitbook-drawing">

Debug Console popup will be open. There are 2 tabs to work with - **Variables** and **History**:<br>

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FB6OMm9c7ZDNN00Cdwd10%2Ffile.excalidraw.svg?alt=media&#x26;token=d6556322-c06f-45c7-b05a-3b7a36981460" alt="" class="gitbook-drawing">

### Variables tab

Variables are listed here. List shows names and current values of variables.

Variables can be edited (click "**Edit**" item on submenu) or added (in the case when variable is used in the Kanban, but not defined yet).

Click proper button "**Add Variables**" to add a variable.

Added variables can be deleted; also they will be deleted automatically on page reload (but will remain if refresh Kanban only).

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FXJNV05a9q2DZX8Rf8dYj%2Ffile.excalidraw.svg?alt=media&#x26;token=3a31f147-1bbd-498d-942e-443b73c42a2a" alt="" class="gitbook-drawing">

Example of variable debugging:

* [Configure variable](https://docs.flexikanban.ai/standard-kanban/configure-kanban/how-to-configure-variables) on the kanban:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FzXInQHclD9BdKWjb8P97%2Ffile.excalidraw.svg?alt=media&#x26;token=82e41541-ed19-428b-be54-59d84941f3df" alt="" class="gitbook-drawing">

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2F5ADhE6J0WInZYXP78bkO%2Ffile.excalidraw.svg?alt=media&#x26;token=b7e08387-d217-42f2-a619-b0975ef10abc" alt="" class="gitbook-drawing">

* Use this variable in the Column name:

<figure><img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FmXdmajaRpPnjYvS0z8Yo%2Fimage.png?alt=media&#x26;token=3696fb17-2607-409c-a471-1d3d9b9c80bc" alt=""><figcaption></figcaption></figure>

* Save the kanban and open it. See the column name with variable value inserted (10):

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FBdeBMWfLEZJLjELBSesY%2Ffile.excalidraw.svg?alt=media&#x26;token=856cc634-62b3-496e-896e-cc39997ba2db" alt="" class="gitbook-drawing">

* Open Debug Console and edit this variable. Save changes:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FSoFlaqQB9kdOUYCIhisM%2Ffile.excalidraw.svg?alt=media&#x26;token=a2d85555-0ac7-4baf-83db-76755a6d1d10" alt="" class="gitbook-drawing">

* Refresh Kanban by clicking proper button. See that column name has been changed correspondingly to new variable value:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FrrBwUsQ2sEMbJupoqOZB%2Ffile.excalidraw.svg?alt=media&#x26;token=b14ebd08-bb2c-4fe3-afc2-d1d104ca7b31" alt="" class="gitbook-drawing">

Example of adding variables:

* set something in the Kanban builder to use some new variable. This variable is not defined in the kanban config:

<figure><img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FjRJEKl6GxvREG4vYsjvc%2Fimage.png?alt=media&#x26;token=4bea3499-5855-454a-bb01-0d7cb85e9a4b" alt=""><figcaption></figcaption></figure>

* Go to the Kanban view and see the place where this variable is used. See that nothing is here because the kanban does not have this variable yet:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2Fz1jVH5hKETPP8BvD9mXV%2Ffile.excalidraw.svg?alt=media&#x26;token=9fa97f8f-8c6a-4414-987f-75888921282e" alt="" class="gitbook-drawing">

* Open Debug Console and add the proper variable:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FZOXhHdgBIezgn7ReceUK%2Ffile.excalidraw.svg?alt=media&#x26;token=7cf22689-c8a4-48c3-a430-aea8db781c44" alt="" class="gitbook-drawing">

* Save changes and refresh Kanban (**not the whole page!**). See that variable value is pasted in the corresponding place:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2F3buSr11fFXO0NPzi4wwo%2Ffile.excalidraw.svg?alt=media&#x26;token=a40035b3-dc84-48c9-a632-76baadf2bb41" alt="" class="gitbook-drawing">

### History tab

* In order to see history, admin should enable it on the kanban first. Go to Kanban config and check "Track History" checkbox:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2Fff17CiOhgiyHipc6QEie%2Ffile.excalidraw.svg?alt=media&#x26;token=252fe73f-bcfa-4381-a3c1-3e7086c01947" alt="" class="gitbook-drawing">

* When history tracking is enabled, user can see history of actions executed on the kanban in the "History" tab of the Debug Console. History tracks execution of actions and action groups that were triggered by card dragging. The data represented in history entries contains:
  * Card name (useful when Kanban has more than one Card)
  * Object (ID of record which is represented by dragged Card)
  * Source Column (name of the Column where Card was dragged from)
  * Target Column (name of the Column where Card was dropped to)
  * Status (state of action / action group execution process)

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FJGmhL9EvP9fpKiWjSwRg%2Ffile.excalidraw.svg?alt=media&#x26;token=8eca0c80-3af7-46ad-be29-459c0dd2247b" alt="" class="gitbook-drawing">

* History entries can be deleted - several or all together. Check checkboxes at entries to be deleted and click "**Clear**" button to delete selected, or click "**Clear All**" button to delete all history:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FiBg6qFauL356SKgj37IM%2Ffile.excalidraw.svg?alt=media&#x26;token=358ca23a-bf86-464a-86c9-88042a70ac77" alt="" class="gitbook-drawing">

* For each tracked history event (entry) user can see list of executed actions. Click on history entry submenu button <img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2F3yJk7arYKx9j7wsPPyBH%2Fimage.png?alt=media&#x26;token=611d5968-328e-4939-99d4-3ff27add3c67" alt="" data-size="original"> and select "**Show Actions**" menu item:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FWXzN6zZ0CuWroqoNDzZA%2Ffile.excalidraw.svg?alt=media&#x26;token=c78b00ef-5ca4-4a77-a505-b626d0a45abe" alt="" class="gitbook-drawing">

* An **Actions** popup will be shown. There is a list of actions and action groups with their types, names and times when execution has been finished. The order of this list corresponds to order which actions were executed in:

<figure><img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FljFSqmp9Caf03t5Bhh6F%2Fimage.png?alt=media&#x26;token=87cde198-06b3-43a2-885b-e70f604c7ec5" alt=""><figcaption></figcaption></figure>

* For each tracked history event (entry) user can see changes made in variables. Click on history entry submenu button and select "**Show Variables**" menu item:

<figure><img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FgNp3NYU7c2lNV2Ioqdpt%2Fimage.png?alt=media&#x26;token=08e4c26c-733a-456c-9f70-f0bf2d6b1d5d" alt=""><figcaption></figcaption></figure>

* A **Variables** popup will appear. It will show the list of existing variables with their names and values that were set after execution of action(s) investigated in the history entry being revised:

<figure><img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FQnCGIuTVUFQJyu9Ofy8I%2Fimage.png?alt=media&#x26;token=45ab540c-9930-43bc-bb7a-4a1278fb191a" alt=""><figcaption></figcaption></figure>
