title: Visual Studio Code - Debug Node JS through TypeScript
body: <p>I'm currently trying to debug a Node JS application written in TypeScript from Visual Studio Code but I have some issues.
  I have a situation similar to the one described on this <a href="https://stackoverflow.com/questions/31169259/how-to-debug-typescript-files-in-visual-studio-code">question</a></p>
  
  <pre><code>|-- .settings
  |----- launch.json
  |-- bin
  |----- app.js
  |----- app.js.map
  |--src
  |----- app.ts
  |-- tsconfig.json
  </code></pre>
  
  <p>Then I have the <strong>tsconfig.json</strong> file:</p>
  
  <pre><code>{
      "compilerOptions": {
          "module": "commonjs",
          "target": "es5",
          "outDir": "bin",
          "rootDir": "src",
          "sourceMap": true
      }
  }
  </code></pre>
  
  <p>The <strong>app.ts</strong>:</p>
  
  <pre><code>console.log("Hello World!");
  </code></pre>
  
  <p>The <strong>launch.json</strong>:</p>
  
  <pre><code>{
      "version": "0.1.0",
      "configurations": [
          {
              "name": "Launch type",
              "type": "node",
              "program": "src/app.ts",
              "stopOnEntry": false,
              "sourceMaps": true,
              "outDir": "bin"
          }
      ]
  }
  </code></pre>
  
  <p>Then I manually compile the project from the command line with</p>
  
  <pre><code>tsc
  </code></pre>
  
  <p>so I get two files in the <strong>bin</strong> directory. I set a breakpoint on <strong>app.ts</strong> and finally run the solution with <strong>F5</strong>, the application starts and stops at the right line but on the <strong>JS</strong> file instead the <strong>TS</strong> one: why???</p>
  
  <p>Am I doing something wrong or trying to achieve the impossible?</p>
  
  <p>Thank you very much for your help! :)</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I've just shared my project on <a href="https://github.com/7brutus7/stackoverflow" rel="nofollow noreferrer">GitHub</a> in order to make things easier! Take a look if you can! :)</p>