title: Debug Command line in Visual Studio code
body: <p>I am now using Visual studio code and I want to debug C/C++ program which runs as a command line. However, debug of Visual studio code just supports the normal program (not a command line program). When I want to debug a command line program, I need to edit my code in which I initialize the argument before running debugger. 
  For example</p>
  
  <pre><code>int main(int argv, char *argc[])
  {
      if (argv != 2)
      {
          printf("Wrong syntax\nCorrect Syntax: readfile &lt;source file&gt;\n");
          exit(1);
      }
      FILE *fp = fopen(argc[1], "rb");
  }
  </code></pre>
  
  <p>When I want to debug, I need to initialize like this:</p>
  
  <pre><code>int main()
  {
      /*if (argv != 2)
      {
          printf("Wrong syntax\nCorrect Syntax: readfile &lt;source file&gt;\n");
          exit(1);
      }*/ //eliminate this part
      argc[1] = "phonebook.dat";
      FILE *fp = fopen(argc[1], "rb");
  </code></pre>
  
  <p>I find it annoying. So how do I change the debugger on VS code to debug C and C++ command line programs?</p>