Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015 RC does not create sourcemap when saving Typescript file

I'm very new to typescript and am trying it out in the latest Visual Studio 2015 RC.

At the moment it compiles the typescript file automatically and creates the underlying js file (nicely underneath the .ts file when you expand it) when I save the ts file. However, there is no sourcemap file, so I never hit any breakpoints in the typescript in visual studio when debugging (regardless of using IE or Chrome canary).

Is there a way to enable it so it will generate the sourcemap files on save? From searching around it seems a lot of the compiler options that used to be in web essentials that have either moved or are not available (yet?):

Screenshot of old options-dialog

like image 809
MIP1983 Avatar asked May 20 '15 14:05

MIP1983


1 Answers

I've found an alternative if you go to add a new file to your project, there is a typescript configuration file option. So if you add a 'tsconfig.json' you get the same settings:

{
  "compilerOptions": {
    "module": "amd",
    "noEmitOnError": true,
    "noImplicitAny": false,
    "removeComments": false,
    "sourceMap": true,
    "target": "es5"
  }
}

I guess this is better as it would potentially allow multiple configurations for different typescript apps in different folders. For my project I've just placed it in the root to apply globally.

like image 147
MIP1983 Avatar answered Oct 20 '22 11:10

MIP1983