Running NodeJS project in Visual Studio Code with yarn : <p>I have a NodeJS project which I can start from command line with <code>yarn start</code> command. My <code>package.json</code> looks similar to this:</p>

<pre><code>{
  "name": "projectname",
  "version": "0.0.1",
  "description": "",
  "author": "My Name",
  "license": "",
  "scripts": {
    "start": "yarn dev",
    "dev": "yarn stop &amp;&amp; pm2 start pm2-dev.yaml &amp;&amp; webpack-dev-server --progress",
    "prod": "yarn stop &amp;&amp; yarn build &amp;&amp; pm2 start pm2-prod.yaml",
    "build": "rimraf dist lib &amp;&amp; babel src -d lib --ignore test.js &amp;&amp; cross-env NODE_ENV=production webpack -p --progress",
    "stop": "rimraf logs/* &amp;&amp; pm2 delete all || true"
  },
  "dependencies": {
    "body-parser": "~1.16.0",
    "ejs": "2.5.5",
    "express": "^4.14.1",
    "pg": "^6.1.2",
    "react": "^15.4.2",
    "redux": "^3.6.0",
  },
  "devDependencies": {
    "babel-cli": "^6.22.2",
    "cross-env": "^3.1.4",
    "eslint": "^3.13.0",
    "pm2": "^2.3.0",
    "redux-mock-store": "^1.2.2",
    "rimraf": "^2.5.4",
    "webpack": "^2.2.1",
    "webpack-dev-server": "^2.2.1"
  }
}
</code></pre>

<p>I am trying to start this project in debugging mode with Visual Studio Code but with almost no luck. I have defined my launch configuration in VS Code <code>launch.json</code> file like this:</p>

<pre><code>{
  // Use IntelliSense to learn about possible Node.js debug attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "yarn",
      "runtimeExecutable": "yarn",
      "runtimeArgs": [
        "start"
      ],
      "port": 5858,
      "cwd": "${workspaceRoot}",
      "timeout": 10000
    }
  ]
}
</code></pre>

<p>The problem with this configuration is that it usually times-out because <code>webpack-dev-server</code> build is longer than 10 seconds. I can increase the <code>timeout</code> in my configuration, but I have noticed that VS Code results with a message <code>Cannot connect to runtime process (timeout after 30000 ms).</code> eventually, so I assume that this is not a good solution. Also, my breakpoints are ignored with this kind of config which tells me that I am definitely doing something wrong here.</p>

<p>This is the first time I am trying out Visual Studio Code and I usually don't use NodeJS, but I got this project with all these scripts in <code>package.json</code> already defined so I'm trying to adopt to it and therefore all the confusion about how to run it properly.</p>

<p>Can Visual Studio Code run a project like this with full debugging functionality at all, and if so, how should I configure my launch script?</p>
