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, click Debug.
  2. In the Launch configuration drop-down list, click a launch configuration.
  3. In the Launch target drop-down list, click a device or simulator.
  4. Click Momentics build button.
  5. In the Launch configuration drop-down list, click Momentics IDE edit icon next to your launch configuration.
  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 app.
    • To prevent the debugging tool from stopping on the first line of your app, clear the Stop on startup at check box. The app runs until you interrupt it manually or until it encounters a breakpoint.

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

    Disable all variables or registers
    Tracking all of 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 of 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 that are 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 different paths, you should make sure that the 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 for BlackBerry 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 files 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 Momentics IDE edit icon beside your launch configuration.
  2. In the Edit Configuration dialog box, click the Source tab.
  3. Click Add. The Add Source Location dialog box 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 files 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. To add source files 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 files are in the C:\source2 folder, type C:\source2 in the first field and C:\source1 in the second field.

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

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

Last modified: 2015-03-31

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

comments powered by Disqus