I need someone to outline how to pass command line arguments to CLion. What I've found so far hasn't worked for me. Specifically I need to know how to pass multiple arguments to the program from the command line.
If you click on Run
-Edit Configurations
you can create an "Application" configuration that allows you to provide the Program arguments
- either in a single line, or in a separate window one argument per line.
I landed on this SO page as I was using CLion with Rust.
For Rust I was able to add the command line arguments to the end of the Run\Edit Configurations\Command
. Notice the required --
.
I got this tip from Jetbrains.
For C, it was Run\Edit Configurations\Program Arguments
, as @Zulan said.
program arguments == command line arguments
, because in latest version I can only see that. –
Parameter It is on the Run Menu, Edit Configurations Option. Provide the various program arguments on the "Program Arguments" input field
Apologies that I am not as good as others with graphics.
Updated answer for 2024.1.1 with CLion:
On the Main Toolbar, just to the right of the Debug run symbol (the bug), there are three vertical dots for additional items. Left click here to open the menu that the first answer speaks about. At the bottom of the popup menu is Configuration with Edit or Delete. Choose Edit and it will open a window to set the command line arguments for your app during debug.
© 2022 - 2025 — McMap. All rights reserved.