To create a launch configuration that will load a compiled
language application for debugging, complete the steps in this topic.
The application must reside on the same AIX machine that is running
the debugger user interface client.
Procedure
- Select File > New launch > Load a program from
the debugger main menu.
- In the Name field, enter a name
of your choice for the configuration that you are creating.
- Select the Main tab to bring it
to the foreground.
- Enter the full path and name of the program that you want
to debug in the Executable field. Alternatively,
you can browse for the program by clicking Browse.
Completion of this field is mandatory.
Note: The Browse action
only allows you to browse the machine that is running the debugger
user interface client.
- In the Parameters field, enter
any program parameters that are required by the application that you
want to debug. This step is optional.
- Select the Run to main radio button
to run to the main entry point of your program. Select the Stop
in initialization radio button to stop before running
any code in your application. For instance, stopping in initialization
would allow you to debug the constructor of a static C++ object.
- Select the Advanced tab, in which
you can make the following settings:
- To set the Source Lookup Path, select the Source tab
and perform any of these tasks:
If you want to search for all instances of the source file
name in the source search path, select the Search for
duplicate source files on the path check box. If you select
this check box and the debugger finds multiple instances of the file
name, you will be prompted by a dialog box to choose the correct source
file.
- Select the Environment tab to bring
it to the foreground. In the Environment page,
you can set environment variables for your debug session. Settings
that you make in this page will only affect your debug session.
Note: Changes made in this tab will only affect the debug engine
and the process to debugged.
You might need to set environment
variables for a variety of factors, for example, to specify the location
of the executable for an application that is required for the debug
session. To set environment variables in this page, perform any of
these tasks:
- By default, if you launched the workbench from a command line
or batch file with environment variables set, these will be the default
environment variables used for the debug session.
- To add an environment variable for the debug session, click the
New button and then complete the New
Environment Variable dialog box with the appropriate values.
The environment variable will be added to the default environment
variables.
- To remove an environment variable for the debug session, select
it from the Environment variables to set list
and then choose the Remove button.
- Click Select to open a dialog box that
allows you to add any variable that is currently in the environment.
- If all information mandatory to the launch configuration
has been provided, the Debug and Apply push
buttons will be enabled. Clicking Apply will
save the launch configuration, at which point you can choose to close
the dialog box without launching the debug session or you can click
Debug to launch a debug session using the
new launch configuration. If you click Debug,
any changes to the launch configuration will be saved and a debug
session will be launched.
Tip: If you have
not yet saved launch configuration settings and if you have made entries
in the launch configuration settings that you want to remove or change,
clicking Revert will remove all changes that
you have made.
- If information mandatory to the launch configuration has
not been provided or if there are errors in the information that you
have provided, messages at the top of the dialog box will indicate
what is missing.
- If you did not use the dialog box to launch a debug session
(for example, you used it instead to create and save a launch configuration),
click Close to exit the dialog box when you
are finished working in it.
Results
To delete a launch configuration, select File
> Launches > Delete Launches from the debugger main menu.
This will open a dialog box, in which you can select the launch or
launches that you want to remove.
To launch a debug session
with a launch configuration that you have already created, select File
> Launches > <launch>, where <launch> is
the launch configuration name that you specified when creating the
launch configuration. This will open the launch configuration dialog
box with the saved settings for the launch configuration. You can
edit these settings before using the launch configuration again.