Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

v8-debug

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

v8-debug

v8 debugger extending API

  • 0.1.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
773
decreased by-2.52%
Maintainers
1
Weekly downloads
 
Created
Source

Build Status

v8-debug

Provides extending API for node internal debugger protocol (based on v8 debugger protocol)

This is a part of node-inspector.

Installation

npm install v8-debug

API

CommandParamsTypeDescription
registerRegister new debug processor command like 'lookup'.
name{String}Name of command.
callback{Function}function(request, response) modify your response in this function.
commandCall debug processor command like 'lookup'
name{String}Name of command.
attributes{Object}Extra parameters, that passes as command arguments.
userdata{Object}Data than needs to be stored, but can't be serialised before call processor callback. (Not implemented now)
commandToEventConvert command response object to default event object with same name
request{Object}Request object created by debugger
response{Object}Response object that needs to be converted

Usage

var debug = require('v8-debug');

//register 'console' event in v8 debugger protocol
debug.register('console', function(request, response) {
  debug.commandToEvent(request, response);
});
//Now debugger can emit new event 'console'

console.log = (function(fn) {
  return function() {
    //Call 'console' command. (Emit console event)
    debug.command('console', {message: arguments[0]} /*, userdata*/);
    return fn.apply(console, arguments);
  }
} (console.log));

For more experience see protocol documentation

Keywords

FAQs

Package last updated on 29 Sep 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc