Debug plugin

Debug plugin adds some useful functionality to the swup for development purposes. Mainly, it outputs all the events in a console as they happen, which can be useful for debugging.

Plugin rewrites swups log method, so any output provided by plugins is visible.

Plugin also tries to detect some common mistakes, and outputs a suggestions into a console.
The list of mistakes the plugin detects is expected to grow over time.


This plugin can be installed with npm

npm install @swup/debug-plugin

and included with import

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

or included from the dist folder

<script src="./dist/SwupDebugPlugin.js"></script>


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

const swup = new Swup({
  plugins: [new SwupDebugPlugin()]