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 🙏

© 2025 – Pkg Stats / Ryan Hefner

trepan-ni

v3.4.5

Published

Trepan debugger for Node Inspect (and based on node inspect debugger)

Readme

trepan-ni

A gdb-like debugger in the trepan debugger family.

trepan-ni example

This guts of this code is based on (and largely made up of) the nodejs "node inspect" debugger. However the command-line interface is being expanded and completely reworked.

For example, we include frame-changing gdb commands like up, down, and frame.

We also document better the in the help system command syntax, and what each does. See for example help "break". and help "syntax".

For an Emacs interface into this debugger, see realgud-trepan-ni. This is part of the realgud debugger interface suite.

Setup:

$ npm install

Install from NPM

$ npm install trepan-ni

Run

Usage: trepan-ni [--inspect] <script.js>  # debugs <script.js>
       trepan-ni -p <process-id>          # debugs connecting to <pid>
       trepan-ni <host>:<port>            # debugs connecting to <host>:<port>

In the first form, you give a nodejs program to bug. Option --inspect causes the debugger not to stop initially. Otherwise there is a breakpoint set before the program proper is run.

In contrast to the first form, in the second form it is also presumed that some nodejs program is already running in debug mode on the same machine, and the process id, or "pid" for that program is pid.

In the the third form, like the second form, it is presumed that some program is running in debug mode which is available by connecting via a socket to host at port port. This allows you to debug remotely to a machine or device outside of the one you are debugging from, although host does not have to be a different machine. For example:

In terminal 1:

$ node --inspect sleep.js
Debugger listening on ws://127.0.0.1:9229/c4f8676e-79dc-453a-8f2b-45d7af9d8327
For help see https://nodejs.org/en/docs/inspector

In terminal 2:

$ trepan-ni 127.0.0.1:9229
connecting to 127.0.0.1:9229 ... ok(trepan-ni) pause
(trepan-ni) break in sleep.js:3
    1 (function (exports, require, module, __filename, __dirname) { for (let i=1; i<10000; i++) {
    2     for (let j=1; j<1000; j++) {
 -> 3 	for (let k=1; k<10000; k++) {
    4 	    ;
    5 	}

See also the help given by node --help, as many of those options are relevant and accepted. Also note in particular the environment variables that can be used to influence execution.

See the demos folder fr a demonstration of the above and possibly other demos.

References