Overview of debugging and testing applications

After you build all or part of an application and compile and save its objects, you can run the application. The PocketBuilder development environment provides two ways to run an application on the desktop: in debug mode and in test mode.

Debug mode

In debug mode, you can insert breakpoints (stops) in scripts and functions, single-step through code, and display the contents of variables to locate logic errors that will result in errors during execution.

Test mode

In the desktop test mode, the application responds to user interaction and runs until you stop it or until a runtime error occurs.

You can also collect trace information while you run your application in test mode, then use the trace data to profile your application. For more information, see Chapter 26, “Tracing and Profiling Applications.”

You can also test an application by deploying and running it on a supported emulator or device.

Troubleshooting advantages by deployment platform

Table 25-1 shows the advantages and disadvantages of troubleshooting an application, depending on where and how you deploy it.

Table 25-1: Troubleshooting advantages by deployment platform

Platform

Advantage

Disadvantage

Running from the IDE

  • Fastest turnaround time

  • Full debugger support

  • Least like PDA environment

  • Different processor, VM, and DLLs

  • Different database configuration

Running in the Emulator

  • Somewhat like the PDA

  • Lets you test applications when a PDA is not available

  • Emulators have bugs of their own

  • Can be cumbersome to install and use

Running in the PDA

  • Real target environment

  • Real database environment

  • Difficult to debug

  • No tracing or remote debugging currently available