title: how to debug typescript files in visual studio code
body: <p>using version 0.3 of visual studio code and I'm not sure how to enable sourcemaps and debug the ts file</p>
  
  <p>I get the following error <code>can't launch program '/Projects/app-server/server.ts'; enabling source maps might help</code></p>
  
  <p>how do I enable sourcemaps and typescript debugging.  Sourcemap is set to true in my </p>
  
  <p>tsconfig.json</p>
  
  <pre><code>{
      "compilerOptions": {
          "target": "ES5",
          "module": "commonjs",
          "sourceMap": true
      }
  }
  </code></pre>
  
  <p>launch.json</p>
  
  <pre><code>{
      "version": "0.1.0",
      // List of configurations. Add new configurations or edit existing ones.  
      // ONLY "node" and "mono" are supported, change "type" to switch.
      "configurations": [
          {
              // Name of configuration; appears in the launch configuration drop down menu.
              "name": "Launch server.ts",
              // Type of configuration. Possible values: "node", "mono".
              "type": "node",
              // Workspace relative or absolute path to the program.
              "program": "server.ts",
              // Automatically stop program after launch.
              "stopOnEntry": true,
              // Command line arguments passed to the program.
              "args": [],
              // Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.
              "cwd": ".",
              // Workspace relative or absolute path to the runtime executable to be used. Default is the runtime executable on the PATH.
              "runtimeExecutable": null,
              // Environment variables passed to the program.
              "env": { }
          }, 
          {
              "name": "Attach",
              "type": "node",
              // TCP/IP address. Default is "localhost".
              "address": "localhost",
              // Port to attach to.
              "port": 5858
          }
      ]
  }
  </code></pre>