Debugging with command-line parameters in Visual Studio

前端 未结 9 2006
误落风尘
误落风尘 2020-11-22 14:52

I\'m developing a C++ command-line application in Visual Studio and need to debug it with command-line arguments. At the moment I just run the generated EXE file with the ar

9条回答
  •  庸人自扰
    2020-11-22 15:38

    Microsoft Visual Studio Ultima 2013.

    You can just go to the DEBUG menu → Main PropertiesConfiguration propertiesDebugging and then you will see the box for the command line arguments.

    Actually, you can set the same input arguments for all the different configurations and not only for debugging.

    From the pull down menu of configuration select: All Configurations and insert the input arguments (each argument separated by space).

    Now, you can execute your program in different modes without having to change the input arguments every time.

提交回复
热议问题