@ecpy/ndx
extended node debugger server and client cli on v8 debugger protocol
Last updated 2 months ago by ecpy .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @ecpy/ndx 
SYNC missed versions from official npm registry.

ndx

extended node debugger server and client cli on v8 debugger protocol

features

  • able to register watchers to automate the debugging process
  • Watcher#onDebugEvent interface returns inspector object based on v8 debugger protocol
  • watcher enables to blackbox and stepover the custom or internal scripts when stepping and trace function calls and variables
  • separated server executable and client cli makes debugging dockerized node app possible

pending works

  • update the cli interface for more easier readability
  • add typings
  • update demo gif
  • support Nestjs

demo

install

yarn global add @ecpy/ndx

# help
npx @ecpy/ndx --help

# launch debug server
npx @ecpy/ndx -s -h localhost -p 3000 $APP 

# launch as debug cli client with watchers
npx @ecpy/ndx -c -h localhost -p 3000 -w $WATCHERS_FILE

examples

  • watcher samples are located at ${PACKAGE_ROOT}/watcher-samples
cd $PACKAGE_ROOT

# test server
./cli.js -s -h localhost -p 3000 ./app-sample 

# test client
./cli.js -c -h localhost -p 3000 -w ./watcher-samples/index.js

ndx> pause

ndx> next

# debug APIs
ndx> help
  • watcher class structure
class VariablesWatcher extends Watcher {
    onDebugEvent(inspector, domain, name, params, nextWatcher) {
        if (domain == 'Runtime') {
            this.log('I am watching runtime domain calls');
        }
        nextWatcher();
    }
}

debug APIs

  • protocol method calls are defined on the inspector object returned by Watcher#onDebugEvent interface, see v8 debugger protocol

development

  • parts of the debugger structure is referenced from node-inspect

Current Tags

  • 1.1.1                                ...           latest (2 months ago)

7 Versions

  • 1.1.1                                ...           2 months ago
  • 1.0.5                                ...           4 months ago
  • 1.0.4                                ...           4 months ago
  • 1.0.3                                ...           4 months ago
  • 1.0.2                                ...           4 months ago
  • 1.0.1                                ...           4 months ago
  • 1.0.0                                ...           4 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 7
Dependencies (4)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |