Henrik Berg
Henrik Berg

Reputation: 549

How to expand command-line arguments when debugging in Visual Studio?

Is there a way to make Visual Studio expand * in file names (and directory names) before invoking the debugger? When I write, e.g., *.txt as the command line arguments, the args[] variable will contain just one entry ("*.txt"), rather than one entry for each matching file. Do I have to write my own code to do this expansion?

Upvotes: 0

Views: 204

Answers (1)

RJFalconer
RJFalconer

Reputation: 11662

If you are invoking visual studio as such:

devenv /debugexe 'myprogram' *.txt

then yes, args[] will contain '*.txt' and you will need to parse and respond to that in your program. (Just the same as if you'd launched the program without the debugger).

Upvotes: 1

Related Questions