{"id":26131926,"url":"https://github.com/trepan-debuggers/trepan-ni","last_synced_at":"2025-10-29T00:17:14.326Z","repository":{"id":57379769,"uuid":"149673807","full_name":"Trepan-Debuggers/trepan-ni","owner":"Trepan-Debuggers","description":"A more gdb-like (v8) node-inspect (v8), in the trepan debugger family","archived":false,"fork":false,"pushed_at":"2024-01-09T21:59:17.000Z","size":1472,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T11:13:37.309Z","etag":null,"topics":["debugger","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Trepan-Debuggers.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":"GOVERNANCE.md","roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-20T21:40:15.000Z","updated_at":"2025-03-09T15:59:33.000Z","dependencies_parsed_at":"2024-09-27T07:02:31.690Z","dependency_job_id":"5972ae0b-6104-4f84-a78e-8172ba449993","html_url":"https://github.com/Trepan-Debuggers/trepan-ni","commit_stats":null,"previous_names":["trepan-debuggers/trepan-ni","rocky/trepan-ni"],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trepan-Debuggers%2Ftrepan-ni","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trepan-Debuggers%2Ftrepan-ni/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trepan-Debuggers%2Ftrepan-ni/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trepan-Debuggers%2Ftrepan-ni/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Trepan-Debuggers","download_url":"https://codeload.github.com/Trepan-Debuggers/trepan-ni/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248782278,"owners_count":21160716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debugger","nodejs"],"created_at":"2025-03-10T22:21:22.779Z","updated_at":"2025-10-29T00:17:09.297Z","avatar_url":"https://github.com/Trepan-Debuggers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# trepan-ni\n\n\nA gdb-like debugger in the trepan debugger family.\n\n![trepan-ni example](demo/help-session.gif)\n\nThis guts of this code is based on (and largely made up of) the nodejs\n\"node inspect\" debugger. However the command-line interface is being\nexpanded and completely reworked.\n\nFor example, we include frame-changing _gdb_ commands like `up`,\n`down`, and `frame`.\n\nWe also document better the in the help system command syntax, and\nwhat each does. See for example `help \"break\"`. and `help \"syntax\"`.\n\nFor an Emacs interface into this debugger, see\n[realgud-trepan-ni](https://github.com/realgud/realgud-trepan-ni).\nThis is part of the [realgud](https://github.com/realgud/realgud)\ndebugger interface suite.\n\n## Setup:\n```bash\n$ npm install\n```\n\n## Install from NPM\n```bash\n$ npm install trepan-ni\n```\n\n## Run\n\n```\nUsage: trepan-ni [--inspect] \u003cscript.js\u003e  # debugs \u003cscript.js\u003e\n       trepan-ni -p \u003cprocess-id\u003e          # debugs connecting to \u003cpid\u003e\n       trepan-ni \u003chost\u003e:\u003cport\u003e            # debugs connecting to \u003chost\u003e:\u003cport\u003e\n```\n\nIn the first form, you give a nodejs program to bug.  Option\n`--inspect` causes the debugger not to stop initially. Otherwise there\nis a breakpoint set before the program proper is run.\n\nIn contrast to the first form, in the second form it is also presumed\nthat some nodejs program is already running in debug mode on the same\nmachine, and the process id, or \"pid\" for that program is _pid_.\n\nIn the the third form, like the second form, it is presumed that some\nprogram is running in debug mode which is available by connecting via\na socket to _host_ at port _port_. This allows you to debug remotely\nto a machine or device outside of the one you are debugging from,\nalthough _host_ does not have to be a different machine. For example:\n\nIn terminal 1:\n```console\n$ node --inspect sleep.js\nDebugger listening on ws://127.0.0.1:9229/c4f8676e-79dc-453a-8f2b-45d7af9d8327\nFor help see https://nodejs.org/en/docs/inspector\n```\n\nIn terminal 2:\n```console\n$ trepan-ni 127.0.0.1:9229\nconnecting to 127.0.0.1:9229 ... ok(trepan-ni) pause\n(trepan-ni) break in sleep.js:3\n    1 (function (exports, require, module, __filename, __dirname) { for (let i=1; i\u003c10000; i++) {\n    2     for (let j=1; j\u003c1000; j++) {\n -\u003e 3 \tfor (let k=1; k\u003c10000; k++) {\n    4 \t    ;\n    5 \t}\n```\n\nSee also the help given by `node --help`, as many of those options are\nrelevant and accepted.  Also note in particular the environment\nvariables that can be used to influence execution.\n\nSee [the demos folder](https://github.com/rocky/trepan-ni/tree/master/demo) for a demonstration of the above and possibly other demos.\n\n\n#### References\n\n* [Debugger Documentation](https://nodejs.org/api/debugger.html)\n* [EPS: `node inspect` CLI debugger](https://github.com/nodejs/node-eps/pull/42)\n* [Debugger Protocol Viewer](https://chromedevtools.github.io/debugger-protocol-viewer/)\n* [Command Line API](https://developers.google.com/web/tools/chrome-devtools/debug/command-line/command-line-reference?hl=en)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrepan-debuggers%2Ftrepan-ni","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrepan-debuggers%2Ftrepan-ni","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrepan-debuggers%2Ftrepan-ni/lists"}