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.
- On the toolbar, in the Launch mode drop-down list, select Debug.
- In the Launch configuration drop-down list, select the UI part of your headless app.
- Click beside the launch configuration drop-down list.
- In the Edit Configuration dialog box, change the Entry-Point to the service part of your headless app.
- Click Apply and then click OK.
- In the Launch target drop-down list, select a device or simulator.
to debug your headless app.
- 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.
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.