GNAT project files have the concept of scenario variables that allow considerable flexibility in controlling how the tools build an executable. (See Scenario Variables for details on scenario variables, and GNAT Projects for the details of GNAT project files.) You can define, for example, different scenarios for debugging and releases, in which optimization and symbolic information are either present or not, respectively.
GNATbench provides the Scenario View for managing scenario variables. The idea is that you can control the build by changing the values of the scenario variables within this view. (See Scenario View for details.)
However, in GNATbench 2.0, changes to scenario variables in the Scenario View are not passed on to the builder. We will fix this in an up-coming release. However, the effect is achievable, you just can't use the Scenario View to do so.
The workable alternative to the Scenario View is to use environment variables defined at the operating system level outside of Workbench. You will change the values of the environment variable(s) between Workbench invocations to change the switches applied during the build.
Note that the process that runs your Workbench environment will interpret all the environment variables when it starts but will not re-interpret them while it is running. It follows that you must set the environment variables' values between invocations of Workbench for changes to be effective.