1.0.18 • Published 8 years ago

debuggerjs v1.0.18

Weekly downloads
4
License
ISC
Repository
github
Last release
8 years ago

debuggerjs

a small debugger for web in Native App

Why we need debuggerjs?

As we known, when developing something in App, we always can't get the error message if something wrong has happened. Meanwhile, if we have a tool showing the errors in the App web view, that would help us a lot to debug. So this is what I've done.

start

npm install debuggerjs

usage

var debug = require('debuggerjs'); 

or use es6

import debug from 'debuggerjs';
    

API

debug.init(options)

use debug.init(options) to listen all javascript code running error.

import debug from 'debuggerjs';
debug.init(options);

options

keyvaluedefault
needShowBoolean. Show errors on your device or nottrue
needReportBoolean. Report errors to your server or notfalse
methodString. The way you send the error to server'post'
urlString. The url you send the error to server''

debuger.log(error)

or you can use debug.log() to log errors manually. The only param could be a Error object or a String.

var script = document.createElement('script');
    script.src = '/somethingBad.js';
    script.onerror = function (error) {
        debug.log(error);
        debug.log('write whatever you want to show');
    };
    
document.body.appendChild(script);
1.0.18

8 years ago

1.0.17

8 years ago

1.0.16

8 years ago

1.0.15

8 years ago

1.0.14

8 years ago

1.0.13

8 years ago

1.0.12

8 years ago

1.0.11

8 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago