---
title: "Debugging"
description: "See where a skeleton came from and whether the page moved."
canonical_url: "https://kukson777.github.io/boneprint/docs/guide/debugging"
---
# Debugging

> See where a skeleton came from and whether the page moved.

A skeleton that doesn't match its content makes the page jump when the content arrives. The debug overlay finds those places. It outlines every skeleton in blue while it loads and says where its shape came from. When the content arrives, the outline turns green if nothing moved, or red with how many pixels it moved.

<debug-demo className="my-5">



</debug-demo>

## Turning it on

Add `?skeleton-debug` to the URL, or turn it on for the whole app:

<code-group>

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  boneprint: { debug: true },
})
```

```ts [main.ts (Vue)]
app.use(boneprint, { debug: true })
```

</code-group>

To outline one part of the page, put `data-skeleton-debug` on any element around it.

## Where a shape comes from

<table>
<thead>
  <tr>
    <th>
      Label
    </th>
    
    <th>
      Source
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        memory
      </code>
    </td>
    
    <td>
      the shape remembered from an earlier load
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data
      </code>
    </td>
    
    <td>
      the data already on screen, with <code>
        :loading
      </code>
      
       over it
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        sample
      </code>
    </td>
    
    <td>
      your <code>
        sample
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        slot
      </code>
    </td>
    
    <td>
      the slot as it is, without <code>
        data
      </code>
      
       or <code>
        of
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        generic lines
      </code>
    </td>
    
    <td>
      nothing to measure: pass a <code>
        sample
      </code>
      
       or an <code>
        id
      </code>
    </td>
  </tr>
</tbody>
</table>

## Seeing what was measured

Put `data-skeleton-xray` on any element around a skeleton. The hidden markup then shows through the bones in red, so you can check that the bars sit on the real lines.

```vue
<div data-skeleton-debug data-skeleton-xray>
  <Skeleton :of="post" :sample />
</div>
```

## When the page moves

Most often the sample is shorter or longer than the real data, so give it text of typical length. If an image moves when it loads, it had no size to begin with: give it a `width` and `height`, or an `aspect-ratio`.


## Sitemap

See the full [sitemap](https://kukson777.github.io/boneprint/sitemap.md) for all pages.
