Set up Avo Mobile Visual Debugger in code

1 minute read

Mobile debuggers are distributed as standalone open source libraries.

Each Avo function will automatically show events in the debugger with timestamp and all the properties.

If Avo detects errors the visual debugger will highlight those.

Debuggers are disabled in the noop mode

Setting up the mobile debuggers

If you have already initialized the Inspector SDK on iOS and Android, no further action is required to enable the Visual Debugger. See showVisualInspector and hideVisualInspector methods of the Inspector SDKs to start using the Visual Debugger.

The following pseudocode would give you the idea, head to platform docs for specific integration instructions.

  1. Create the debugger
JavaScript
Copy
1
val debugger = Debugger()
  1. Pass debugger when you initialize Avo, so Avo can show all tracked events
JavaScript
Copy
1
Avo.initAvo(AvoEnv.DEV, ..., debugger)
  1. Show the debugger
JavaScript
Copy
1
debugger.showDebugger(this, DebuggerMode.bar)
  1. Post your own events
JavaScript
Copy
1
2
3
4
5
6
7
debugger.post(
timestamp,
"EventName",
errors: [{propertyId:"id0", message:"error in property 'event prop' with id 'id0'"}],
eventProperties: [{id:"id0", name:"event prop", value:"val"}],
userProperties: [{id:"id1", name:"user prop", value:"val"}]
);

Open source repositories and platform specific integration docs

We store the source code, platform docs and example apps in the corresponding GitHub repositories.