Add Program Arguments and Environment Variables
You can influence the runtime behavior of your app by adding program arguments and environment variables to run/debug configurations.
Add program arguments
From the main menu, select Edit Configurations from the run/debug configurations selector on the toolbar.
or chooseIn the Run/Debug Configurations dialog that opens, select a configuration where you want to pass the arguments.
Type the arguments in the Program arguments field. The arguments should be separated with spaces.
Click to expand the text field, so you can view and edit the whole list of arguments.
Add environment variables
From the main menu, select Edit Configurations from the run/debug configurations selector on the toolbar.
or chooseIn the Run/Debug Configurations dialog, select a configuration where you want to add the environment variables.
Type the variable name and value:
<name>=<value>
. If you add several variables, they should be separated with semicolons.Alternatively, click and add the variable name and value to the User environment variables list.
In the dialog that opens, you can also see the list of available system environment variables. Clear the System environment variables checkbox if you don't want to use the system environment variables for the selected run/debug configuration.
Use EzArgs plugin
You can also use the EzArgs plugin that provides a convenient way for passing arguments to C++ run/debug configurations by writing them in a dedicated box on the toolbar.
The specified options are used for the current project and will be attached to the end of the command line arguments set through the project properties when you press Run or Debug the next time.
Enter the arguments in the field or choose recent arguments from the dropdown list.
Installation
You can install the EzArgs plugin from the plugin repository (Marketplace) or from a local archive file (ZIP or JAR).
Install plugin from Marketplace
Press Ctrl+Alt+S to open the IDE settings and select
.Find the plugin in the Marketplace and click Install.
To install a specific version, go to the plugin page in the JetBrains Plugin Repository, download and install it as described in Install plugin from disk. For example, you can do it if the most recent version of the plugin is broken.
Install plugin from disk
Download the plugin archive (ZIP or JAR).
Press Ctrl+Alt+S to open the IDE settings and select
.On the Plugins page, click and then click Install Plugin from Disk….
Select the plugin archive file and click OK.
Click OK to apply the changes and restart the IDE if prompted.