title: How can I set up launch.json in Visual Code to debbug C
body: <p>I'm newbie about Visual Code. I'd like to use Debbuging function with Visual Code.
  But There is a probelm to do it. It may happen by wrong launch.json setting(In my opnion)</p>
  
  <p>I'm using <strong>mac os</strong> newest version.</p>
  
  <p>I refered to some pages to do it myself.</p>
  
  <p><a href="https://code.visualstudio.com/docs/languages/cpp" rel="nofollow noreferrer">https://code.visualstudio.com/docs/languages/cpp</a></p>
  
  <p><a href="https://github.com/Microsoft/vscode-cpptools/blob/master/launch.md" rel="nofollow noreferrer">https://github.com/Microsoft/vscode-cpptools/blob/master/launch.md</a></p>
  
  <p><a href="https://code.visualstudio.com/docs/python/debugging" rel="nofollow noreferrer">https://code.visualstudio.com/docs/python/debugging</a></p>
  
  <p>However I saw same error. It said <em>"launch: program '${/Users/bpk/Documents/Study/C/Study}/study' does not exist"</em></p>
  
  <p>This is my <strong>launch.json</strong> file below</p>
  
  <pre><code>    {
      "version": "0.2.0",
      "configurations": [
  
  {
      "name": "Python3",
      "type": "python",
      "request": "launch",
      "stopOnEntry": true,
      "pythonPath": "${config:python.pythonPath}",
      "program": "${/Users/bpk/Documents/Study/Python3/study.py}",
      "cwd": "${/Users/bpk/Documents/Study/Python3}",
      "env": {},
      "envFile": "${/Users/bpk/Documents/Study/Python3}/.env",
      "debugOptions": [
          "RedirectOutput"
      ]
  },
          {
              "name": "(gdb) Launch",
              "type": "cppdbg",
              "request": "launch",
              "program": "${/Users/bpk/Documents/Study/C/Study}/study",
              "args": [],
              "stopAtEntry": false,
              "cwd": "${/Users/bpk/Documents/Study/C/Study}",
              "environment": [],
              "externalConsole": false,
              "MIMode": "gdb",
              "setupCommands": [
                  {
                      "description": "Enable pretty-printing for gdb",
                      "text": "-enable-pretty-printing",
                      "ignoreFailures": true
                  }
              ]
          },
          { 
              "name": "(gdb) Attach",
              "type": "cppdbg",
              "request": "attach",
              "program": "${/Users/bpk/Documents/Study/C/Study}/study",
              "processId": "${command:pickProcess}",
              "MIMode": "gdb"
          }
      ],
      "compounds": []
  }
  
  =cmd-param-changed,param="pagination",value="off"
  [New Thread 0x1803 of process 16326]
  [New Thread 0x1a03 of process 16326]
  [New Thread 0x2703 of process 16326]
  ERROR: Unable to start debugging. Unexpected GDB output from command        "-exec-run". Warning:
  Cannot insert breakpoint -1.
  Cannot access memory at address 0xf782
  The program '/Users/jaekwangkim/Documents/Workspace/Project/C/PE_File_Assembler/a.out' has exited with code 42 (0x0000002a).
  </code></pre>
  
  <p>Upper message is debug console log from visual code</p>
  
  <p>Thanks to read my first question!</p>