How to debug a C# command-line program

后端 未结 6 1660
说谎
说谎 2021-02-07 04:11

I\'m trying to build a command-line tool in C# with VS2010.

My question is: how do I debug this, like I would a winforms.
With winforms, I can step through the code,

6条回答
  •  走了就别回头了
    2021-02-07 04:35

    When you have command line arguments then you need to follow different route to debug. Go to project and then select properties. There you will see debug section and then give required parameters. So that it will take care of passing parameters to the program. If you have multiple parameters then separate them with space. After that if you debug it will hit the break point directly. For more info check here how to debug c# through command line arguments in visual studio

提交回复
热议问题