title: vs code: debug typescript running in nodejs, while specifying source root
body: <p>I would like to debug my typescript code (which runs in NodeJS) with VSCode.
  The following code is my starting point and works just fine.</p>
  
  <p>Typescript code:</p>
  
  <pre><code>//src/index.ts
  console.log('line 1');
  console.log('line 2');
  </code></pre>
  
  <p>The compiler settings:</p>
  
  <pre><code>//tsconfig.json
  {
      "compilerOptions": {
          "module": "commonjs",
          "sourceMap": true
      },
      "exclude": [
          "node_modules"
      ]
  }
  </code></pre>
  
  <p>And the launch configuration</p>
  
  <pre><code>//.vscode/launch.json
  {
      "version": "0.2.0",
      "configurations": [
          {
              "type": "node",
              "request": "launch",
              "name": "Launch Program",
              "skipFiles": [
                  "&lt;node_internals&gt;/**"
              ],
              "program": "${workspaceFolder}/src/index.js"
          }
      ]
  }
  </code></pre>
  
  <p>In the above setup, I can add breakpoints in the typescript code and then start debugging.</p>
  
  <p>All typescript source code is in a directory called <code>src/</code>. I would like to specify this in the compiler settings by adding the following config option:</p>
  
  <pre><code>"compilerOptions": {
      //...
      "sourceRoot": "src"
  </code></pre>
  
  <p>It still compiles just fine and when executed, it prints "line 1", "line 2".</p>
  
  <p>However, the breakpoints no longer work. I looked at the generated sourcemaps and they specify a path "sourceRoot":"src". I guess that this breaks the sourcemap lookup. Since the original sources are in the same folder as the generated output.
  How do I configure this correctly in the compiler?</p>