Charles Khunt
Charles Khunt

Reputation: 2505

debug command line application

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

Upvotes: 1

Views: 470

Answers (4)

Casey Williams
Casey Williams

Reputation: 4083

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

Upvotes: 1

Mark Ransom
Mark Ransom

Reputation: 308530

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).

Upvotes: 7

C. K. Young
C. K. Young

Reputation: 223183

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.

Upvotes: 1

bdonlan
bdonlan

Reputation: 231443

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

Upvotes: 1

Related Questions