This project is read-only.

Source maps in VS 2012 for non-Typescript project type

Topics: General
Oct 22, 2013 at 1:56 PM
Hey all,

I want to debug my Typescript but I've hosted it within an MVC4 application. How can I tell the compiler to generate source maps? I know this is done for you when you create a Typescript HTML application.

Additionally, how can I tell the compiler to combine all my TS into a single JS file? It's annoying having to manually update my bundle every time I add a new TS file (and it's corresponding JS file).

Oct 24, 2013 at 5:12 PM
We're working on making this easier. For the time-being, you'll need to unload your project, edit it, and add these lines with the other TypeScript* lines for your build type (Debug or Release)

For combining all the output into one .js file:


And for turning on source maps:


If you edit the project for the default HTML5 application, you can get a better feel for the defaults it uses and what the XML looks like.
Oct 25, 2013 at 2:52 AM
Thanks! That worked. Now I'm running into a different issue that I thought was fixed (at least from what I read).

In my VS solution, I have a folder, Game, and in it are all my game classes. I thought I wouldn't need a reference to the individual files but it looks like I do because if I don't, I get compiler errors. I know there might be an issue with the declaration files, but the rest are all in the global scope which I thought are automatically referenced by TS.

Could you shed some light on when/when aren't TS files auto-included as references?
Oct 25, 2013 at 7:17 PM
If you're inside of a TypeScript project (like the HTML5 template or a converted ASP.NET project), you should get all .ts files auto-referencing each other. In old style projects that were made with TypeScript versions before, I believe, 0.9.1, the files would not auto-reference each other.