Best Practices

From WebOS101

Jump to: navigation, search

Contents

Introduction

Here is some collected wisdom from the webOS development community.

Coding

Debugging

  • To help with debugging, use Mojo.Log.info("%j", object) to log out the contents of an object. This is invaluable to use when getting responses from Mojo service requests to see what actually came back.
  • When code isn't working write, wrap it in try/catch blocks. Not all errors will be logged automatically and sometimes errors occur in places you don't expect.

Useful Links

Personal tools