Attach to a running application

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 phone starts, or to debug someone else's app.

  1. On your device or simulator, start the process that you want to attach your application to.
  2. On the Momentics IDE toolbar, select the Launch configuration for your app.
  3. In the Launch mode drop-down list, select Attach.
  4. In the Launch target drop-down list, select a device or simulator.

    To resolve any device connection issues, click Edit, and follow the instructions on the Device Properties dialog box.

    Screen showing the Launch Target drop-down list with the Edit icon, which opens the Device Properties dialog box.

  5. Click Momentics Launch 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. On the Debug view toolbar, click The Resume icon.

    The debugging tool stops at MsgReceivePulse, which can be continued when that default breakpoint is hit. The tool can then stop at the breakpoints that you want to inspect when the application executes that code.

  7. When you are done, click The Disconnect icon.

The debug session terminates but the process continues to run.

Last modified: 2014-06-24



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

comments powered by Disqus