# @swup/debug-plugin

> A swup plugin for debugging and helping in development

Latest version **4.1.0** (published 2024-08-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install @swup/debug-plugin
pnpm add @swup/debug-plugin
yarn add @swup/debug-plugin
bun add @swup/debug-plugin
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 4.1.0 |
| Published | 2024-08-02 |
| First published | 2019-05-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 49 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Georgy Marchuk |
| Maintainers | hirasso, daun, gmrchk |

## Links

- npm: https://www.npmjs.com/package/@swup/debug-plugin
- Repository: https://github.com/swup/debug-plugin
- Homepage: https://github.com/swup/debug-plugin#readme
- Issues: https://github.com/swup/debug-plugin/issues
- npm.io page: https://npm.io/package/@swup/debug-plugin

## Dependencies (1)

- [@swup/plugin](https://npm.io/package/@swup/plugin.md) ^4.0.0

## Recent versions

- 4.1.0 (latest) — 2024-08-02
- 4.0.4 — 2023-09-28
- 4.0.3 — 2023-09-28
- 4.0.2 — 2023-09-26
- 4.0.1 — 2023-07-28
- 4.0.0 — 2023-07-26
- 3.0.0 — 2023-03-10
- 2.0.0 — 2022-08-20
- 1.0.3 — 2019-07-28
- 1.0.2 — 2019-05-12
- 1.0.1 — 2019-05-01
- 1.0.0 — 2019-05-01

## README

# Swup Debug Plugin

A [swup](https://swup.js.org) plugin for debugging and helping in development.

- Detect common mistakes and suggest solutions in the console
- Output all triggered hooks to the console as they happen
- Configure swup's `log` method to make its output visible

## Installation

Install the plugin from npm and import it into your bundle.

```bash
npm install @swup/debug-plugin
```

```js
import SwupDebugPlugin from '@swup/debug-plugin';
```

Or include the minified production file from a CDN:

```html
<script src="https://unpkg.com/@swup/debug-plugin@4"></script>
```

## Usage

To run this plugin, include an instance in the swup options.

```javascript
const swup = new Swup({
  plugins: [new SwupDebugPlugin()]
});
```

## Options

### globalInstance

If `true`, the plugin will store the swup instance on the global window object, making swup
available at `window.swup`. Defaults to `false`.

```javascript
{
  globalInstance: true
}
```

---
_Source: https://npm.io/package/@swup/debug-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
