# @amoutonbrady/solid-debug

> Simple debugger for Solid

Latest version **0.2.2** (published 2021-03-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @amoutonbrady/solid-debug
pnpm add @amoutonbrady/solid-debug
yarn add @amoutonbrady/solid-debug
bun add @amoutonbrady/solid-debug
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2021-03-13 |
| First published | 2020-09-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 22.5 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Alexandre Mouton-Brady |
| Maintainers | amoutonbrady |
| Keywords | solid, solidjs, debug |

## Links

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

## Dependencies (1)

- [solid-js](https://npm.io/package/solid-js.md) ^0.24.13

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.2.2 (latest) — 2021-03-13
- 0.2.1 — 2021-02-08
- 0.2.0 — 2021-02-08
- 0.1.0 — 2020-09-25
- 0.0.1 — 2020-09-05

## README

# Solid Debug

Simple visual debugger for [solid](https://github.com/ryansolid/solid)

<img src=".github/demo.gif">

[Demo](https://codesandbox.io/s/solid-debugger-w71zb)

## Quick start

Install it:

```bash
pnpm add @amoutonbrady/solid-debug
```

Use it:

```tsx
import { render } from 'solid-js/dom';
import { Component, createSignal, createState } from 'solid-js';
import { DebugProvider, useDebugger } from '@amoutonbrady/solid-debug';

const App: Component = () => {
  const [count, setCount] = createSignal(0);
  const [s, ss] = createState({ test: 'hello' });

  // Register a context (if empty, it will be added to the global context)
  const debugGlobal = useDebugger();
  const debugApp = useDebugger('app');
  const debugCounter = useDebugger('counter');

  debugCounter(count);
  debugGlobal(count);
  debugApp(s);

  return (
    <>
      <button onClick={() => setCount(count() + 1)}>{count()}</button>
      <input value={s.test} onInput={(e) => ss({ test: e.target.value })} />
    </>
  );
};

const root = document.getElementById('app');

if (root) {
  render(
    () => (
      // Wrap the app with the provider
      <DebugProvider>
        <App />
      </DebugProvider>
    ),
    root,
  );
}
```

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