0.1.17 • Published 7 years ago
@wirelineio/wire-inspect v0.1.17
What is wire-inspect?
wire-inspect is a small utility library for diagnostics.
How do I use it?
To use wire-inspect, first require the @wirelineio/wire-inspect module in your code:
require('@wirelineio/wire-inspect');It is activated at runtime via the WIRE_INSPECT environment variable or localStorage.wireInspect setting.
The value should either * to enable everything, or a comma-separated list of specific behaviors to activate.
wire-inspect uses the debug package for logging, so you will usually enable them together, for example:
For example:
WIRE_INSPECT='*' DEBUG='*' node ./src/index.jsor
localStorage.wireInspect = 'event-tracing'
localStorage.debug = 'event-tracing:*'Behaviors
event-tracingPatchesEventEmitter, logging when and where events are attached and emitted.
When emitted, not only the current callstack is shown, but also the callstack from when the event handler was attached.
events:EventEmitter:documents.crdt -> +1s [ 'dWhCnuSlTkKR2qGgVKoIcQ-0', 'jjjj\nk', true ]
================== EMIT STACK:
{anonymous}()@http://localhost:8080/app.js:490506:18
~~~~~~~~~~~~~~~~~~ ATTACH STACK(s):
Indexer.onChange()@http://localhost:8080/app.js:490639:16
documentChanged()@http://localhost:8080/app.js:501657:34
{anonymous}()@http://localhost:8080/app.js:484713:22
done()@http://localhost:8080/app.js:198524:21
Item.../../node_modules/process/browser.js.Item.run()@http://localhost:8080/app.js:373766:14
drainQueue()@http://localhost:8080/app.js:373736:42
------------------
==================