Skip to content

How To debug a Plugin on a device

o5faruk edited this page May 2, 2021 · 6 revisions

⚠️⚠️⚠️

This sdk documentation is deprecated and will not be updated. Check out our new docs at https://sdk.buildfire.com/docs/

⚠️⚠️⚠️

Finding bugs on devices can be daunting. With the different platforms, version and devices finding an illusive bug can give you gray hair.

The BuildFire SDK gives you a very simple way to expose your console logs on the device.

Logging

The good news is, you dont need to do anything different than what you already do when logging events to the console with console.log, console.debug, console.warn and console.error The BuildFire SDK will collect these logs and expose them when ready

Displaying the logs

Load an instance of your plugin in app then tap/click the Title 5 times Click the title 5 times

Then the logs will appear.

buildfire.logger

Use this namespace to access methods and properties to change the behavior manually

buildfire.logger.logMaxLength

is a property that defines how many logs to retain. Defaults to 500

buildfire.logger.logMaxLength = 1000;

buildfire.logger.clearHistory()

is a method that allows you to manually clear the previous logs

buildfire.logger.showHistory()

is a method that allows you to display the logs without the need to click on the title 5 times

buildfire.logger.hideHistory()

is a method that allows you to hide the log display

Note:

To hot load changes onto your device see https://github.com/BuildFire/sdk/wiki/App-Developer-Mode

Clone this wiki locally