## Customizing Launch Configurations

Use the Debug dialog to customize launch configurations previously created in a project, or to create new launch configurations. Ideally, you should create new launch configurations using the New Launch Configuration Wizard. Doing this will ensure that the project's default launch configuration is valid and can successfully launch a debug session. However, not all default launch configurations satisfy all the needs of a project, so being able to modify a launch configuration's options can allow you to customize how the project is launched and debugged based on the needs of that project.

There are two methods for setting up a launch configuration, including:

- Default launch configuration (recommended) — the New Launch Configuration Wizard automatically sets up a default launch configuration to run or debug the project on the first Run or Debug execution. This provides a quick and easy method to start running or debugging a project without the inconvenience of setting a lot of options. The default launch configuration can always be edited later as the project launch requirements change.
- Custom launch configuration— enables you to create or modify a launch configuration to suit the needs of the project. To modify a launch configuration, create one using the New Launch Configuration Wizard, then enable the Advanced Options option on the New Launch Configuration page before you click Finish. This opens the Debug dialog so you can immediately customize the new launch configuration's options.

NOTE To see if a project already has a launch configuration, open a Run or Debug window using the Run > Open Run Dialog... or Run > Open Debug Dialog... menu items.

In the event that the default launch configuration settings need to be changed, it is possible to edit them in the Debug window, or create a new launch configuration for the project that deviates from the default settings.

#### Creating a Custom Launch Configuration

1. Open the Run or Debug launch configuration window
   - Select the Run> Open Run Dialog... or Run > Open Debug Dialog... menu item

     The appropriate Run or Debug launch configuration window appears (Figure 1).

   Figure 1 - Initial blank Debug launch configuration window

2. Select a type of launch configuration (for example, Symbian OS Emulation), then click the New launch configuration icon to create a new configuration of that type.

   A new configuration appears in the Configuration list under the appropriate section using the project name and target to create the configuration name.

   NOTE By default, when you click New, the project information is used to fill in the Project and Process to launch text boxes. You normally should not have to edit these for a run/debug a project. If a bld.inf has multiple MMPS then the first executable named in the list of MMP files is used to fill in the executable field. Therefore, for projects with multiple MMPs you may need to change the executable field.

   Figure 2 - New launch configuration with name and settings filled in (emulator)

3. View the information to define the project and executable

   Modify or fill in the following fields in the Main tab so the IDE can setup the configuration properly each time. Typically when creating a new executable from a project that has successfully linked, the fields will be auto-populated and do not need to be modified. The important fields here are:

   - Name - This is a unique name to identify this launch configuration. It can be any name.
   - Project - The project to associate with this launch configuration. Click Browse to select a different project.
   - Process to launch - This is the name of the executable that is linked to the project.
4. Modify settings in the other tabs to customize the launch configuration for the project
   - Environment (Eclipse)
   - Debugger
   - Executables
   - x86 Exceptions
   - Arguments (Eclipse)
   - Source (Eclipse)
   - Common (Eclipse)

   To debug something outside of the workspace, be sure to import the binary into the Executables view.

5. Click Debug

   The IDE launches the executable. If the launch configuration is set to change perspective, it switches to the specified perspective.

#### Other references