How to debug a C# command-line program

后端 未结 6 1667
说谎
说谎 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:43

    You just need to add a breakpoint to the first line of the main function (you can do this by clicking on the line in the Visual Studio editor and hitting F9) and hit F5 to start a debug session.

提交回复
热议问题