O'Reilly logo

Palm OS Programming, 2nd Edition by Neil Rhodes, Julie McKeehan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Source-Level Debugging

The source-level debugging is different between CodeWarrior and PRC-Tools. We’ll look at each in turn.

Source-Level Debugging with CodeWarrior

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

You first need to enable source-level debugging with Enable Debugger from the Project menu. This is a toggle menu item; if it says Disable Debugger, then debugging is enabled.

Choosing a target

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

To use POSE, select Palm OS Emulator from the Target pop-up menu in the Palm Connection Settings panel of the Preferences dialog box (see Figure 7-10).

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 (by default) stops at the first line of the program.

Tip

If the “Always launch emulator” option is set, CodeWarrior will automatically launch POSE when you start CodeWarrior.

To use the handheld, specify the target as Palm OS Device in Preferences (see Figure 7-11). When you choose Debug from the Project menu, CodeWarrior prompts you to enter console mode (see Figure 7-12). Use Shortcut, tap, tap, 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 program’s first line of the program.

Figure 7-10. Selecting options for ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required