Debug.js

在手机上打印调试信息。

Download .zip Download .tar.gz View on GitHub

debug.js

在手机上打印调试信息。

快速上手

debug.success("This is success message:)");
debug.error("This is error message:)");
debug.log("This is primary message:)");
debug.log({a: 1, b: 2});
debug.log([1,2,3]);

为了方便调试,debug.js会默认开启捕捉浏览器的报错。如果你不需要这个功能,可以这样禁止它:

  debug.silence();

预览

preview

安装

bower install binnng/debug.js
component install binnng/debug.js

Angualr

如果你使用angular:

var app = angular.module("myApp", [
  "binnng/debug"
]);

app.controller("ctrl", function($debug) {
  $debug.success("Welcome to debug.js");
});

源码

http://binnng.github.io/debug.js/docs/debug.html

Demo

http://binnng.github.io/debug.js/demo/index.html