title: React debug Using VSCode and Firefox instead of Chrome
body: <p>I try to debug a react application using VSCode's debugging "capabilities", so far with a quick web search I found many resources claiming on how to do that using VSCode's debugger for Crome such as:</p>
  
  <ul>
  <li><a href="https://hackernoon.com/debugging-react-like-a-champ-with-vscode-66281760037" rel="noreferrer">https://hackernoon.com/debugging-react-like-a-champ-with-vscode-66281760037</a></li>
  <li><a href="https://medium.com/@auchenberg/live-edit-and-debug-your-react-apps-directly-from-vs-code-without-leaving-the-editor-3da489ed905f" rel="noreferrer">https://medium.com/@auchenberg/live-edit-and-debug-your-react-apps-directly-from-vs-code-without-leaving-the-editor-3da489ed905f</a></li>
  </ul>
  
  <p>But I cannot find a way to do that with firefox. So far I installed "Debugger for firefox" on the VSCode and I put the following debugging options:</p>
  
  <pre><code>{
      "version": "0.2.0",
      "configurations": [
          {
              "name": "Debug app",
              "type": "firefox",
              "request": "attach"
          }
      ]
  }
  </code></pre>
  
  <p>And I run as per documentation states:</p>
  
  <pre><code>firefox -start-debugger-server -no-remote
  </code></pre>
  
  <p>And I try to intitialize the debug process over the VSCode, when I do that I get the error:</p>
  
  <blockquote>
    <p>connect ECONNREFUSED 127.0.0.1:6000</p>
  </blockquote>
  
  <p>Tha thew error can be confirmed over my GNU/Linux machine running the following command</p>
  
  <pre><code>netstat -ntlp
  (Not all processes could be identified, non-owned process info
   will not be shown, you would have to be root to see it all.)
  Active Internet connections (only servers)
  Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
  tcp        0      0 127.0.0.1:37893         0.0.0.0:*               LISTEN      9368/node       
  tcp        0      0 0.0.0.0:27017           0.0.0.0:*               LISTEN      -               
  tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      -               
  tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN      -               
  tcp        0      0 127.0.0.1:9333          0.0.0.0:*               LISTEN      10924/code      
  tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN      -               
  tcp        0      0 10.42.0.1:53            0.0.0.0:*               LISTEN      -               
  tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      -               
  tcp        0      0 0.0.0.0:3000            0.0.0.0:*               LISTEN      6732/node       
  tcp        0      0 127.0.0.1:3001          0.0.0.0:*               LISTEN      6784/mongod     
  tcp        0      0 0.0.0.0:3002            0.0.0.0:*               LISTEN      11168/node      
  tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      -               
  tcp        0      0 0.0.0.0:20256           0.0.0.0:*               LISTEN      9368/node       
  tcp6       0      0 :::9090                 :::*                    LISTEN      11340/node      
  tcp6       0      0 :::139                  :::*                    LISTEN      -               
  tcp6       0      0 ::1:631                 :::*                    LISTEN      -               
  tcp6       0      0 :::445                  :::*                    LISTEN      -       
  </code></pre>
  
  <p>So I am asking on how can I use the VSCode's debugging capabilities on a React app created with <code>react-create-app</code> and running via <code>npm start</code> commands using firefox?</p>
  
  <h1>Edit 1</h1>
  
  <p>For some reason over the currently running firefox instance I get the error:</p>
  
  <blockquote>
    <p>[Parent 13358, Gecko_IOThread] WARNING: pipe error (173): Η σύνδεση έκλεισε από το ταίρι: file /build/firefox-JSAO4L/firefox-57.0.3+build1/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 353</p>
  </blockquote>
  
  <p>Do you haqve any idea why firefgox closes the debugger?</p>