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

bugger-daemon

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bugger-daemon

buggerd sources

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

bugger-daemon

Main point of communication/integration between the many moving parts of bugger.

  • Any process being bugger'd will register with buggerd
  • Instrumentation code will communicate with buggerd
  • The Chrome extension will ask buggerd for information about running procs
  • All DevTools will communicate via websocket with buggerd

ASCII art time


  --------------------------- Chrome ---------------------------
 |                    |                    |                    |
 |     DevTools A     |     DevTools B     |     bugger.crx     |
 |         |          |         |          |         |          |
  ---------|--------------------|--------------------|----------
           |                    |                    |
           | (I)                | (I)                | (II)
           |                    |                    |
  ---------|---------------- buggerd ----------------|----------
 |         V          |         V          |         V          |
 |  Domain Agents A   |   Domain Agents B  |   Meta HTTP API    |
 |        |           |               \    |         Δ          |
  --------|----------------------------\-------------|----------
          |                             \            |
          | (III)                        | (III)     |
          |             _________________|__________/| (II)*
          V            /                 V           |
      ------- A.js ---/---             ------- B.js -|------
     |               /    |           |              |      |
     |  Instrumentation   |           |   Instrumentation   |
     |                    |           |                     |
      --------------------             ---------------------

(I)   Chrome Remote Debugging Protocol // websocket
      https://developers.google.com/chrome-developer-tools/docs/protocol/1.0/

(II)  REST API for basic meta data about debugged processes (see below)

(II)* The instrumentation code may also communicate directly with the domain
      agents if necessary.

(III) v8 debugger protocol
      https://code.google.com/p/v8/wiki/DebuggerProtocol

META HTTP API

GET /processes

Array with all known processes. See next section for schema.

GET /processes/:pid

Get information about a process with a given PID. Will only work if the process was instrumented previously. Data will look like this:

{
  "title": "some_script.js param1 --num=10",
  "script": "some_script.js",
  "params": [ "param1", "--num=10" ],
  "pid": 70491,
  "pwd": "/home/jdoe/workspace/tools",
  "websocket": "/processes/70491"
}

DELETE /processes/:pid

Unregister a process.

PUT /processes/:pid

Used by instrumentation to register a new process. It expects JSON data in the body that looks like the one shown in the GET request, only without title.

GET /processes/:pid [Upgrade: websocket]

Websocket that the devtools can connect to. If buggerd is running at http://127.0.0.1:8058 (which is the default), then the proper devtools url for a process with PID 70491 would be:

chrome-devtools://devtools/devtools.html?ws=127.0.0.1:8058/processes/70491&toolbarColor=rgba(230,230,230,1)&textColor=rgba(0,0,0,1)

GET /processes/:pid/source-maps/:mapId

Get the content of a source map.

Keywords

FAQs

Package last updated on 26 Jul 2013

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