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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jdapena/trace-chrome

v0.3.0

Published

Chrome tracer using Remote Debugging Protocol

Readme

trace-chrome

Status: maintained, MIT licensed. Contributions welcome — see CONTRIBUTING.md.

trace-chrome is a NodeJS script for obtaining a running Chrome browser instance trace.

This is the same kind of traces you obtain using chrome://tracing).

Prepare

Fetch the repository, and on its root run:

npm install

It should fetch chrome-remote-interface.

Run

Run chrome with remote debugging port enabled:

google-chrome --remote-debugging-port=9222

Take into account Chrome only allows local access to the debugging port. Set up tunnels if needed if you connect to a remote browser.

Then, again on the root of the trace-chrome folder do:

nodejs bin/trace-chrome.js -H localhost -p 9222 > yourtrace.json

When the tracing session is finished, press ctrl+c, and it will dump the resulting JSON.

Check parameters allowed with

nodejs bin/trace-chrome.js --help

Web UI

Instead of driving capture from the command line, you can run a small local web UI to configure and control tracing from the browser:

nodejs bin/trace-chrome.js -p 9222 --ui

The UI listens on http://127.0.0.1:9223/ by default. Pass --ui 8080 to choose a different port, or --ui-host 0.0.0.0 to bind on all interfaces (this exposes start/stop control to the network — only use it on trusted networks).

The page lets you set the Chrome remote-debug host and port (prefilled from -H/-p if you passed them), pick categories (with a few presets matching Chromium's about://tracing, plus a "Show available" button that lists categories from the connected Chrome in two columns), set memory-dump options, then Start and either Stop & Download or Stop, Download & Open in Perfetto. The latter saves the trace locally and pushes it into ui.perfetto.dev via its postMessage handshake.

Only one trace can be running at a time. Press Ctrl+C to stop the server.

Examples

Trace chromium on desktop

If you want to trace chromium on desktop with this tool, first enable remote debugging port on running it:

path/to/chromium --remote-debugging-port=9222

Then connect to it in the same machine:

nodejs bin/trace-chrome.js -p 9222 > yourtrace.json

Trace chromium on remote device

On running chromium, enable remote debugging port:

chromium --remote-debugging-port=9876

As Chromium sets as incoming address 127.0.0.1, remote access to the debugging port is not allowed. So a tunnel is needed to access device port from host machine. SSH can be used for that:

ssh root@DEVICE_IP -L 9876:localhost:9876

This will tunnel 9876 port on device to host 9876 port.

Now tracing tool can be used from host:

nodejs bin/trace-chrome.js -p 9876 > yourtrace.json