Source-Level Debugging with CodeWarrior

CodeWarrior can do source-level debugging either with a handheld (attached via a serial cable) or with POSE.

In either case, you’ve got to enable source-level debugging with Enable Debugger from the Project menu. (This is a toggle menu item, so if it says Disable Debugger, debugging is on.)

Choosing a Target

You need to tell CodeWarrior whether you are using POSE or the handheld; then it needs to acquire its target.

Using POSE

To use POSE, select Palm OS Emulator from the Target pop-up menu in the Preferences dialog box (see Figure 10.3).

Selecting options for debugging using POSE

Figure 10-3. Selecting options for debugging using POSE

In order to debug, POSE has to be running. When you choose Debug from the Project menu, CodeWarrior automatically downloads the PRC file to the Emulator and stops at the first line of the program.

Using a handheld

To use the handheld, specify the target as Palm OS Device in the Preferences dialog box (see Figure 10.4). When you choose Debug from the Project menu, CodeWarrior prompts you to enter console mode (see Figure 10.5). At that point, use shortcut .2 on the handheld, and click OK in the CodeWarrior dialog box. CodeWarrior then automatically downloads the PRC file to the device and stops at the first line of the program.

Specifying the device as the target in the Preferences dialog box

Figure 10-4. Specifying the device ...

Get Palm Programming: The Developer's Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.