Skip to content
forked from krasimir/deb.js

Minimalistic JavaScript library for debugging in the browser

License

Notifications You must be signed in to change notification settings

robertmirro/deb.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deb.js

~1.5K minimalistic JavaScript library for debugging in the browser

  • works on functional level
  • groups your console.log statements and place them in a proper context
  • displays stack traces, passed arguments and execution time

Usage

Add deb.min.js at the top of your page. Before every other script file.

<script src="deb.min.js"></script>

Add .deb() After the definition if your functions.

var calculateSomething = function(cb) {
	// ...
}.deb();

Open your console. You should see something like that:

deb.js

Use .debc() to collapse the output.

Deb.js as Chrome extension

Deb.js in Google Web Store

There is an extension for Chrome that injects deb.min.js in your page. All you have to do is to open this url and add debjs somewhere in your URL. For example:

http://mysite.com/ <-- Deb.js is disabled
http://mysite.com?data=yes&prop=20&debjs <-- Deb.js is enabled

Once you do that the extension will inject the file before your page's content and you will be able to use .deb() or debc() methods.

Notice that if Deb.js is enabled you will see a small badge ON applied.

deb.js

Articles

Deb.js: the Tiniest Debugger in the World

Preview

Here is an animated gif that demonstrates how Deb.js outputs information about the executed function.

deb.js

Build

  1. npm install
  2. npm run build

About

Minimalistic JavaScript library for debugging in the browser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%