Kong
Kong

Reputation: 2422

How to debug visual studio solution with command line arguments?

I have a solution in visual studio that I am trying to debug. In normal applications, I always run it via the executable through command line

Stereo-Vision arg1 arg2 arg3 arg4 arg5

If I want to debug while observing variables through the watch window etc, is the only possible way to do this is to set the arguments in Configuration Properties -> Debugging -> Command Arguments then to run the program inside of visual studio ?

Upvotes: 0

Views: 416

Answers (1)

Jack Zhai
Jack Zhai

Reputation: 6436

I agree with Mitch Wheat's suggestion, if you want to debug the app using the command line Parameters and view the variables using the debugging windows. We just could set the command line parameters in the project property.

If you don't have to use the command line parameters, for example, read the value from a file or without modify the app code, and then debug it using the VS IDE, it would have other workarounds like creating the unit tests project or read the value from files using the StreamReader class or others.

Upvotes: 1

Related Questions