Developer Tip: Debugging Headless Apps for BlackBerry 10.3

CASCADES / 08.15.14 / shadidhaque

Debug Headless Apps

Since the introduction of headless apps in BlackBerry OS 10.2.0, many of our fellow developers have built fantastic apps that run in the background. Thank you. However, there is one thing we all are anxiously waiting for – debugging those headless apps.

So far we have relied on QDebug()s and printfs. But if you haven’t guessed already from the title, let me say it again – headless app debugging is finally here with Momentics 2.1. Since this is the most anticipated enhancement to our developer tools, we made sure that it’s one of the easiest things to use in the IDE.

Without further ado, let’s have a look at how I just debugged a headless app today. First and foremost, add some break points in your headless project’s source code.

debug headless 1

  1. On the toolbar, in the Launch mode drop-down list, select Debug.debug headless 2
  2. In the Launch configuration drop-down list, select the UI part of your headless app.debug headless 3
  3. Click beside the launch configuration drop-down list.debug headless 4
  4. In the Edit Configuration dialog box, change the Entry-Point to the service part of your headless app.debug headless 5
  5. Click Apply and then click OK.
  6. In the Launch target drop-down list, select a device or simulator.debug headless 6
  7. Clickdebug headless 9 to debug your headless app. debug headless 7
  8. 8. Voilà! The Momentics IDE changes to the Debug perspective, installs the app on your simulator or device, and starts the app under the control of the debugging tool. debug headless 8

The support for headless debugging completes the developer experience with headless apps, and I have no doubt that this will help us all design and build even better headless apps. Until next time, have a blast with this, and feel free to yell @ShadidHaque any time.

About shadidhaque