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

bugger

v2.3.0

Published

Chrome Devtools Agents for node.js

Downloads

26

Readme

bugger

Build Status

Warning: Experimental

bugger provides Chrome Devtools bindings for node. It integrates tightly with Chrome which means two things:

  • It attempts to fully support the usual Devtools experience, including workspaces and profiling tools.
  • It may break at any moment because Chrome moves fast.

Installation

npm install -g bugger

Usage

Start the script process

Start example/alive.js in debug mode:

bugger example/alive.js

Pass parameters to the script:

# This will be interpreted as a port paramter for alive.js
bugger example/alive.js --port=3000
# This will be interpreted as a port paramter for bugger itself
bugger --port=3000 example/alive.js

Pass V8 options (or advanced node options):

node --trace_gc $(which bugger) example/alive.js

Open the devtools

The correct URL will be written to the output. It should look similar to this:

chrome-devtools://devtools/bundled/devtools.html?ws=127.0.0.1:8058/websocket

You can also open chrome://inspect if you started Chrome with --remote-debugging-targets=localhost:8058. The process should pop up on that page almost immediately.

Options:

  • -v, --version: Print version information
  • -h, --help: Show usage help
  • -p, --port: The devtools protocol port to use, default: 8058
  • -b, --brk: Pause on the first line of the script

Features

Console Tab

  • Basic support for console API
  • Evalute expressions in the console
  • Fully featured repl when not paused (including require)
  • Parts of the Command Line API supported

Sources Tab

  • Step-by-step debugging
  • Variable introspection
  • Live edit the running JavaScript code and persist it using workspaces (really just a Devtools feature)
  • Break on [uncaught] exception
  • Uses existing source maps (e.g. created via babel --source-maps or coffee --map)
  • Forked modules show up as worker threads. This includes modules forked via cluster.

Known Issues

  • For babel-core/register and coffee-script/register, editing the files doesn't work #48

Network Tab

  • Monitor outgoing http(s) requests your script does
  • Timing of requests, including connect times etc.

Timeline Tab

  • GC events
  • Basic heap usage graphs

Known Issues

  • The timeline tab doesn't do anything useful right now. In future it should show (#47):
    • console.{time, timeEnd, timeStamp}
    • Network request
    • Heap usage over time
    • Profiling data

Profiles Tab

Kudos to...

...the original projects

bugger was heavily inspired by node-inspector and nodebug.

Reference links

  • https://chromium.googlesource.com/chromium/blink.git
  • http://chromedevtools.github.io/debugger-protocol-viewer/Debugger/
  • https://github.com/nodejs/node