Configure debugging for your app

In your app's launch configuration, the Debugger settings allow you to customize how the debugging tool works. These settings affect your app only when you debug it, not when you run it.

  1. On the toolbar, in the Launch mode drop-down list, select Debug.
  2. Select the Launch configuration.
  3. In the Launch target drop-down list, select a device or simulator.
  4. Click Momentics build button.
  5. In the Launch configuration drop-down list, click Edit next to your launch configuration.

    Screen showing the Edit button in the Launch Configuration drop-down list on the toolbar.

  6. In the Edit Configuration dialog box, click the Debugger tab.
  7. Configure the settings that you need:
    Change where the debugging tool stops
    By default, the debugging tool stops on the first line of your application. If you clear the check box, the app runs until you interrupt it manually, or until it encounters a breakpoint.
    • To prevent the debugging tool from stopping on the first line of your application, clear the Stop on startup at check box.

      Screen showing the debugging tool options that change the behavior of the debugging tool when it starts.

    Disable all variables or registers
    Tracking all the variables or registers can decrease performance. To improve performance, you can disable some or all variables or registers, and then manually enable individual variables or registers.
    • To disable all the variables or registers, click Advanced, and then clear the Variables or Registers check boxes.

    Screen showing the Advanced Options dialog box that is available from the Debugger tab on the Debug Configurations dialog box.

    Specify a GDB command file
    • To specify a GDB command file, click Browse, and then select the file.
    • To specify a file for running gdb , use the -command option.
    See all commands sent to and from GDB
    • Select the Verbose console mode check box.
    Ensure that breakpoints are set correctly
    If your app has multiple files with the same file name but with different paths, you need to ensure that breakpoints are set for the appropriate file.
    • Select the Use full file path to set breakpoints check box.
    Add libraries
    You can select specific libraries or you can have the Momentics IDE add them automatically.
    • Click the Shared Libraries tab.
    • To add specific libraries, click Add, select the library, and then click OK.
    • To add libraries automatically, click Auto.
    Disable line-by-line stepping of library symbols
    By default, the debugging tool loads shared library symbols automatically and watches line-by-line stepping of library functions in the C/C++ editor. If your device or simulator doesn't have much memory, you may want to disable this line-by-line stepping because the library symbols consume RAM on the device.
    • Clear the Load shared library symbols automatically check box.
    Break when a shared library is loaded
    The debugging tool can break when a shared library or DLL is loaded or unloaded.
    • Select the Stop on shared library events check box.
  8. Click Apply, and then click OK.

Add source files to debug

In your launch configuration, you can specify where the debugging tool should look for source files. By default, the debugging tool uses the source from the project in your workspace, but you can specify source files from other locations, such as a central repository.

To specify a new source location:

  1. In the Launch configuration drop-down list, click Edit next to your launch configuration.

    Screen showing the Edit button in the Launch Configuration drop-down list on the toolbar.

  2. In the Edit Configuration dialog box, click the Source tab.
  3. Click Add. The Add Source Location dialog appears.
  4. Select the type of source that you want to add to the lookup source path from the following:
    Absolute File Path
    An absolute path to a file in the local file system. This is the default setting.
    File System Directory
    A directory in the local file system. To add source from outside your workspace, select the File System Directory path type, and click OK. Type the path to your source in the Select location directory field, or use the Browse button to locate your source.
    Path Mapping
    A path mapping.
    A project in the workspace.
    All projects in the workspace. If you wish to add source from your workspace, select the Workspace path type, or from a specific folder select Workspace Folder and then click OK.
    Workspace Folder
    A folder in the workspace.

    To specify a mapping between folders, select Associate with, and specify the folder in the available field. For example, if your app is in the C:\source1 folder and the source is in the C:\source2 folder, enter C:\source2 in the first field and C:\source1 in the second field.

    To recurse through the subfolders to find the source, select the Search subfolders option.

  5. After you click OK, you can remove or modify a source path by selecting a source lookup path from the list, and then clicking Remove or Edit.
  6. To change the order of source lookup paths by selecting a type, and then clicking Up or Down. To search for duplicates in your source locations, select the Search for duplicate source files on the path checkbox.
  7. Click Finish. The Momentics IDE for BlackBerry adds the new source location.

Last modified: 2014-06-24

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

comments powered by Disqus