@fitbit/fdb-debugger
TypeScript icon, indicating that this package has built-in type declarations

1.7.3 • Public • Published

@fitbit/fdb-debugger

FDB Debugger is a package that can be used to debug Fitbit OS applications.

Interface

class RemoteHost extends EventEmitter

Connect

static async connect(
  hostStream: stream.Duplex // stream for communicating with the host,
  {
    userAgentSuffix = '',
    timeout = 10000,
  } = {},
)

Installing an Fitbit OS Application

async installApp(
  componentBundle: 'app' | 'companion',
  data: Buffer,
  {
    onProgress = (() => {}) as (bytesWritten: number, totalBytes: number) => void,
  } = {},
)

Taking a Screenshot

takeScreenshot(
  format: string,
  onWrite?: (received: number, total?: number) => void,
)

Receiving logs

// Console Messages (log, info, warn, error)
remoteHost.on('consoleMessage', (msg: ConsoleMessage) => any);

// Trace Messages (trace, assert, exception)
remoteHost.on('consoleTrace', (msg: TraceMessage) => any));

ConsoleMessage && Trace Message

Usage

See sdk-cli for an full example of how to use fdb-debugger.

Dependencies (9)

Dev Dependencies (5)

Package Sidebar

Install

npm i @fitbit/fdb-debugger

Weekly Downloads

136

Version

1.7.3

License

BSD-3-Clause

Unpacked Size

29.5 kB

Total Files

11

Last publish

Collaborators

  • gmaniak
  • stefanrm
  • hexxeh
  • orviwan