# Debug

## Setup

**Attribute:** `sf-debug`

**Values:**  `none` , `true` or `steps`

**Default:** `false`

**Where:** Apply to the `script` tag of Superform within the `<head>` or just before `</body>`.

Enables detailed console output for debugging purposes during form interaction. It logs **form data**, **step count**, **progress percentage**, and **scores** at each step change, providing a collapsible and organized view of form state changes.&#x20;

Enables also step expansion for total control of all steps at the same time inside a debug view.<br>

### 1. `sf-debug` or `sf-debug = true`

Console logging of data.

{% code title="index.html" %}

```html
<!-- Superform by Delta Clan -->
<script defer sf-debug src="https://cdn.jsdelivr.net/npm/@deltaclan/superform@2/dist/superform.js" >
</script>
```

{% endcode %}

{% tabs %}
{% tab title="Overview" %}

<figure><img src="https://450000313-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDGLtnaQr6bP3qHCWvX0r%2Fuploads%2F7bRxfrfadlm5iRNuj9ee%2FCleanShot%202024-06-17%20at%2020.19.02%402x.png?alt=media&#x26;token=43ff40a0-30a8-47d1-a01e-f3cfccb57d53" alt="" width="563"><figcaption><p>Setting <code>sf-debug</code> inside the script tag.</p></figcaption></figure>

<div align="center"><figure><img src="https://450000313-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDGLtnaQr6bP3qHCWvX0r%2Fuploads%2FgREdEq9LJVqLDE1UP1SG%2FCleanShot%202024-06-17%20at%2020.33.51%402x.png?alt=media&#x26;token=6a02cdab-eda3-48e9-98a9-966c82863a25" alt="" width="375"><figcaption><p>Console output of <code>sf-debug</code> and/or <code>sf-debug=true</code></p></figcaption></figure></div>

<figure><img src="https://450000313-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDGLtnaQr6bP3qHCWvX0r%2Fuploads%2FcnSBvAZpBnekj8EqBJuA%2FCleanShot%202024-06-17%20at%2020.26.58%402x.png?alt=media&#x26;token=29ddcff0-205f-4aab-b5e9-5040b4f36b33" alt="" width="375"><figcaption><p>Console output legend.</p></figcaption></figure>
{% endtab %}

{% tab title="Video" %}
{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDGLtnaQr6bP3qHCWvX0r%2Fuploads%2FoStxrc3UV8vmD9nhoqHI%2Fsf-debug-simple-friend.mp4?alt=media&token=9ffbb114-e636-4f91-a9d0-77d533280fc4>" %}
{% endtab %}
{% endtabs %}

### 2. `sf-debug = steps`

Activates console logging alongside step expansion specifically designed to enhance debugging in multi-step forms. By enabling `sf-debug="steps"`, you can ensure thorough oversight and easier management of form dynamics.

{% code title="index.html" %}

```html
<!-- Superform by Delta Clan -->
<script defer sf-debug="steps" src="https://cdn.jsdelivr.net/npm/@deltaclan/superform@2/dist/superform.js" >
</script>
```

{% endcode %}

<figure><img src="https://450000313-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDGLtnaQr6bP3qHCWvX0r%2Fuploads%2FhVhzxQpchngzLwBrSqSa%2FCleanShot%202024-06-19%20at%2013.44.41%402x.png?alt=media&#x26;token=263b9ccc-d717-40fd-be09-64b466192aa5" alt=""><figcaption></figcaption></figure>

<figure><img src="https://450000313-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDGLtnaQr6bP3qHCWvX0r%2Fuploads%2FFbng89Zw99HBOQdtep1K%2FCleanShot%202024-06-19%20at%2014.06.37%402x.png?alt=media&#x26;token=c2599807-d3e8-48de-840c-33f595942410" alt=""><figcaption><p><strong>Example</strong>. Expanded steps inside Wized to control all elements at the same time inside a multistep-form.</p></figcaption></figure>
