title: Electron/VSCode : Cannot connect to runtime process, timeout after 10000 ms - (ECONNREFUSED)
body: <p>I've got a minimal Electron app setup on OSX which works fine when run via command line but I'm unable to use Visual Studio Code to run in debug mode:</p>
  
  <pre><code>Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:13207).
  </code></pre>
  
  <p>My launch.json file looks like:</p>
  
  <pre><code>{
      "version": "0.2.0",
      "configurations": [
          {
              "type": "node",
              "request": "launch",
              "name": "Launch Program",
              "program": "${workspaceRoot}/main.js",
  
              "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
              "runtimeArgs": [
                  ".",
                  "--enable-logging"
              ],
              "env": {},
              "console": "internalConsole",
              "sourceMaps": false
          },
          {
              "name": "Attach",
              "type": "node",
              "request": "attach",
              "port": 5858,
              "address": "localhost",
              "restart": false,
              "sourceMaps": false,
              "localRoot": "${workspaceRoot}",
              "remoteRoot": null
          }
      ]
  }
  </code></pre>
  
  <p>Any help would be much appreciated.</p>