Debugging with command-line parameters in Visual Studio

前端 未结 9 1825
误落风尘
误落风尘 2020-11-22 14:52

I\'m developing a C++ command-line application in Visual Studio and need to debug it with command-line arguments. At the moment I just run the generated EXE file with the ar

9条回答
  •  太阳男子
    2020-11-22 15:36

    The Mozilla.org FAQ on debugging Mozilla on Windows is of interest here.

    In short, the Visual Studio debugger can be invoked on a program from the command line, allowing one to specify the command line arguments when invoking a command line program, directly on the command line.

    This looks like the following for Visual Studio 8 or 9 (Visual Studio 2005 or Visual Studio 2008, respectively)

      devenv /debugexe 'program name' 'program arguments'
    

    It is also possible to have an explorer action to start a program in the Visual Studio debugger.

提交回复
热议问题