views:

183

answers:

4

I'm wondering if it's possible to debug a command line application (where main received arguments argc, and **argv) in visual studio 2008?

+1  A: 

Yes; it works the same way as in a GUI application. Set a breakpoint somewhere, and hit debug start.

bdonlan
+1  A: 

Sure! Just set a breakpoint on main, and go to your project properties (under the Debug section if I remember right), then set the command-line arguments you want to debug with.

Chris Jester-Young
+7  A: 

You can easily set the command arguments to the executable from within Visual Studio, in the Debugging screen under Configuration Properties (at least that's where it is in 2005).

Mark Ransom
+1  A: 

Why wouldn't it be possible? Set a breakpoint and start debugging.

Lunchy