Skip to content

Simple debuger works like console.log() but pushing messages to HTML.

Notifications You must be signed in to change notification settings

th3mon/simple-debugger

Repository files navigation

SimpleDebugger

SimpleDebugger works like console.log(). It puts messages into DOM.

CI Status

master: CircleCI develop: CircleCI

How to use it

In browser as <script> tag

<script src="simple-debugger.min.js"></script>

You will need add CSS file also to your web page.

<link href="simple-debugger.css" rel="stylesheet">

Then create Logger instance and use it.

const loggerId = 0;
const logger = new SimpleDebugger.Logger(loggerId);

You can check if it works, so add some test message by Logger.

logger.add('Testing');

Message should appear on your website.

You can check demo files.

In app by npm

First install SimpleDebugger.

npm i -D github:th3mon/simple-debugger

Then import it where you can use it.

import { Logger } from 'simple-debugger';

class SomeClassInYourApp {
  constructor() {
    const loggerId = 0;
    const logger = new SimpleDebugger.Logger(loggerId);

    logger.add('Testing');
  }
}

Remember that Logger works on DOM so your module should be on Frontend part of your application.

Getting Started

Install dependencies

npm i

Scripts

Dev

npm run dev

Dist

npm run build

Run dev server

npm start

Run tests

npm test

Run tests on watch

npm run test:watch

Run tests coverage

npm run test:coverage

Libraries and Tools

Webpack

Used plugins:

About

Simple debuger works like console.log() but pushing messages to HTML.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •