npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

debuguy

v0.1.3

Published

An unintrusive log analysis/debugging/profiling tool

Downloads

8

Readme

debuguy

Join the chat at https://gitter.im/seiyugi/debuguy

Build Status

An unintrusive log analysis/debugging/profiling tool

Demo

TBC

Getting Started

If you want to use debuguy right away

Install with cli command

$ npm install -g debuguy
$ debuguy --help
$ debuguy --version
# parse javascript sources and replace debuguy comments with console.log
$ debuguy parse ./scripts ./debug
# launch debuguy local profiling report server
$ adb logcat | debuguy profile

Documentation

At build time debuguy parses comments of a predefined format and replace them with console.log expressions. These console.log are passed to a HTML reporter at run time to generate an activity diagram.

The comment format to be specified in javascript source file is:

/* debuguy: tag('<TAG_NAME>') */

The <TAG_NAME> is a customizable tag that you'd like to mark any specific checkpoint in your javascript source code. It could be either taskA or taskA.childA, the debuguy reporter will generate the report according to the hierachy of the tags.

Run debuguy parse to replace debuguy comments with console.log expressions.

$ debuguy parse <SOURCE_DIR> <OUTPUT_DIR>

Run debuguy profile to generate profiling report from a standard input stream.

$ <STREAM> | debuguy profile

Then by navigating to http://127.0.0.1:8000 you could see the report generated by debuguy.

Examples

Parsing and replacing debuguy comments:

$ debuguy parse ./lib ./debug
$ debuguy parse ./gaia/apps/music/js

Launch report:

$ adb logcat | debuguy profile

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Gulp.

Fork and clone https://github.com/seiyugi/debuguy.git

  1. Fork debuguy repository.
  2. sh $ git clone ssh://github.com/<YOUR_NAME>/debuguy

Install dependency

$ npm install

Run gulp

$ gulp

In the local folder, you can run your local debuguy with

$ ./cli.js parse ./source_dir

Automatically add console.log after each functions

$ ./cli.js autolog ./source_dir [-c]

Or, in the local folder, run sh $ npm install -g . to install debugy with your local copy.

The option argument "-c" will print an ending-log to indicate function-end, so this can help you to show a Call Stack graph,.

After using -c argument, you can use profile feature to show a Call Stack graph.

If nothing breaks, then you are good. :+1:

It's time to hack! :neckbeard:

License

Copyright © 2014 seiyugi Licensed under the MPL license.