An unintrusive log analysis/debugging/profiling tool
npm install debuguydebuguy
=======

> An unintrusive log analysis/debugging/profiling tool
TBC
Install with cli command
``sh`
$ npm install -g debuguy
$ debuguy --help
$ debuguy --version
`sh`parse javascript sources and replace debuguy comments with console.log
$ debuguy parse ./scripts ./debug
`sh`launch debuguy local profiling report server
$ adb logcat | debuguy profile
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:
`js`
/ debuguy: tag('`
The 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.`sh`
$ debuguy parse `
Run debuguy profile` to generate profiling report from a standard input stream.`sh`
$
Then by navigating to http://127.0.0.1:8000 you could see the report generated by debuguy.
Parsing and replacing `debuguy` comments:`sh`
$ debuguy parse ./lib ./debug`sh`
$ debuguy parse ./gaia/apps/music/js
Launch report:
`sh`
$ adb logcat | debuguy profileContributing
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/`
Install dependency
`sh`
$ npm install
Run gulp
`sh`
$ gulp
In the local folder, you can run your local debuguy with
`sh`
$ ./cli.js parse ./source_dir
Automatically add console.log after each functions
`sh`
$ ./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:
Copyright © 2014 seiyugi
Licensed under the MPL license.