svelte-debug-console

0.0.2 • Public • Published

svelte-debug-console

svelte-debug-console

debug.js implementation for Svelte SPA, SSR and sveltekit static sites. See your debug statements in the browser.

Features

  • [x] svelte server side rendering (SSR) friendly.
  • [x] works with sveltekit SPA, SSR and static site adapters.
  • [x] auto scrolls to the last entry.
  • [x] typescript definitions are included for LSP.

Demonstration

svelte-debug-console demo

Getting Started

# install as a development dependency
pnpm install -D svelte-debug-console

Basic Usage

Import the library onto your template and update your google key:

import { Debug } from "svelte-debug-console";
/*
 │Debug: svelte <Debug> component.
 */

In your parent component, add the <Debug>:

<Debug discard={"false"} />

If you want to start fresh, set discard option to true.

By default, debug.js will only create a single instance across your application. svelte-debug-console will inject itself into the main debug instance.

For some use cases, this may not be desired.

Issues

If any trouble, please create an issue. PRs are most welcome.

Package Sidebar

Install

npm i svelte-debug-console

Weekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

36.5 kB

Total Files

9

Last publish

Collaborators

  • anakha