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.
- On the toolbar, in the Launch mode drop-down list, click Debug.
- In the Launch configuration drop-down list, click a launch configuration.
- In the Launch target drop-down list, click a device or simulator.
- Click .
- In the Launch configuration drop-down list, click next to your launch configuration.
- In the Edit Configuration dialog box, click the Debugger tab.
- 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.
- 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.
- 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
- To disable all of the variables or registers, click Advanced, and then clear the Variables or Registers check boxes.
- 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
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.
- 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:
- In the Launch configuration drop-down list, click beside your launch configuration.
- In the Edit Configuration dialog box, click the Source tab.
- Click Add. The Add Source Location dialog box appears.
- 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.
- To remove or modify a source path, click OK, select a source lookup path from the list, and then click Remove or Edit.
- 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.
- Click Finish. The Momentics IDE adds the new source location.
Last modified: 2015-03-31