Defining a launch configuration

In this example we show how to create a new project using one of the built-in Carbide templates, how to build it into an executable, and how to launch the debugger to verify program accuracy. The steps to do this include:

  1. Creating a project from a project template
  2. Building the object code based on the project sources
  3. Defining a launch configuration for running or debugging the application
  4. Controlling and debugging the running program using the Carbide debugger

To run or debug a project you need a launch configuration. A project must have at least one launch configuration, and can have as many as necessary. It is not unusual to have two or more launch configurations per target device, usually a debug version and a run version. You can use the New Launch Configuration Wizard to create them all.

Once the emulator or device is loaded with the executable, a debug session can begin.

If at any time the New Launch Configuration Wizard encounters a problem during a later launch sequence it will request settings clarification before continuing. For example, maybe the target device has changed, or a new ROM has been installed. Either of these will trigger a request for clarification.

Defining a launch configuration (emulator example)

  1. Select the project to run in the Project Explorer view.
  2. To run the project without the debugger choose:

    To simply run the project on the chosen target use one of the following actions. Use this option to verify a release program's execution without debugging symbols.

    1. Right-click the project and click Run As > Run Symbian OS Application on Emulator.
    2. Click the Run > Run (CTRL-F11) menu item.
    3. Click the Run (Run icon) icon in the toolbar.
  3. Select the Process to launch in the Executable Selection page, then click Next.

  4. Set the Build (if required) before launching option in the Build Options Selection page, then click Next.

  5. Verify the new launch configuration settings in the New Launch Configuration page.

  6. (Optional) Checkmark the Advanced settings option to further customize the launch configuration.
  7. Click Finish.

    Carbide launches the emulator, transfers the HelloWorld executable to it, then launches the program (see below). You can then use the soft-keys to choose actions from the Options soft-menu. Click the Exit soft-key to close the emulator and return to Carbide.c++.

    Emulator

With a launch configuration in place, its now possible to edit, build, and run a project in the emulator. However, since none of us can write perfect code the first time the use of a debugger is essential for further development of our project.

NEXT STEP > Controlling and debugging the running program using the Carbide debugger

Other references