Skip to content

BogdanTaranenko/remote-debugger

Repository files navigation

Installation

npm install --save @b.taranenko/js-remote-debugger
or
yarn add @b.taranenko/js-remote-debugger

Usage

  1. Go to Javascript Remote Debugger site
  2. Add workspace name (optional)
  3. Generate workspace
  4. Inside your project:
import remoteDebugger from '@b.taranenko/js-remote-debugger';
// app startup
remoteDebugger.initialize(YOUR_WORKSPACE_ID) // should be called BEFORE any remoteDebugger.log() calls

remoteDebugger.setUserInfo(string) // optional

// somewhere in your code
await remoteDebugger.log(
  {
    type: REGULAR | WARNING | INFO | ERROR,
    data: any,
    label: string // (optional),
  },
  (event) => void // onSuccess (optional),
  (error) => void // onError (optional),
)