Attach to a running app

You can use the Attach launch mode to connect to and debug a process that's already running on your device or simulator. It must be a process that you don't need to redeploy or restart in the Momentics IDE for BlackBerry. The process must have a project in the Momentics IDE. For example, you can use the Attach launch mode to debug a service app that starts when the device starts, or to debug someone else's app.

  1. On your device or simulator, start the process that you want to attach your app to.
  2. On the Momentics IDE toolbar, in the Launch configuration drop-down list, click a launch configuration.
  3. In the Launch mode drop-down list, click Attach.
  4. In the Launch target drop-down list, click a device or simulator. To resolve any device connection issues, click Momentics IDE edit icon, and follow the instructions in the Device Properties dialog box.
  5. Click Momentics build button. The Momentics IDE changes to the Debug perspective and looks for the process that corresponds to the project. If it doesn't find the right process, the Select Process dialog box opens.
  6. In the Select Process dialog box, select a running process, and then click OK.
  7. On the Debug view toolbar, click The Resume icon. The debugging tool stops at MsgReceivePulse, and you can continue debugging when that default breakpoint is hit. The tool can then stop at the breakpoints that you want to inspect when the app executes that code.
  8. When you are done, click The Disconnect icon.

The debug session terminates but the process continues to run.

Last modified: 2015-03-31

Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus