I'm using TypeScript in my Visual Studio Project. There are the following files:
- Example.ts
- Example.js.map
- Example.js
To Debug the TypeScript code in Chrome it is necessary to have this as the last line in the .js file
//# sourceMappingURL=Example.js.map
But sometimes Visual Studio removes this line, and sometimes it adds it. Everytime changing and saving the .ts file it removes the sourceMapping line. When I build the whole project over Build -> Build "Project Name" it adds the sourcemapping line.
On the project configuration under TypeScript Build -> Generate source maps is enabled. Compile on save is also enabled.
It would be nice that Visual Studio does not remove the sourcemapping after changing and saving the .ts file.