How do I start a program with arguments when debugging?

前端 未结 6 1916
南笙
南笙 2020-12-04 13:50

I want to debug a program in Visual Studio 2008. The problem is that it exits if it doesn\'t get arguments. This is from the main method:

if (args == null ||         


        
6条回答
  •  独厮守ぢ
    2020-12-04 14:36

    For Visual Studio Code:

    • Open launch.json file
    • Add args to your configuration:

    "args": ["some argument", "another one"],

提交回复
热议问题