Developer Tip: Debugging Headless Apps for BlackBerry 10.3

Cascades

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 Shadid

Application Development Consultant at Research In Motion (RIM), Shadid is a developer and more importantly a developer developer. He has been working closely with the dev community to help bring the best BlackBerry® experience to their applications. A key contributor in the Developer Relations team, Shadid is the lead contact for Location Bases Services, Sensors, Bluetooth and Deep Integration of Apps. Working with BlackBerry developers is not just his job but a passion he shares with the BlackBerry developer community.

Join the conversation

Show comments Hide comments
+ -
blog comments powered by Disqus