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?
1 Answer
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).
1 Comment
Henrik Berg
Actually, no, I invoke the debugger by hitting F5, after entering the arguments under "Project properties" -> "Debug" -> "Command Line Arguments". And I do not surround them with quotation marks.
cmd, so it's not completely absent. Anyway, I solved it by simply creating a list of all the files I needed, and assigning the list toargsat the beginning of my debugging session. But it's kind of fiddly, and such an obvious thing that VS should support IMHO.