Visual Studio 2013 Plugin - Does it Generate Source Maps?

Topics: General
Aug 7, 2013 at 9:24 PM
Hi,

Does the VS 2013 Plugin 0.9.1 generate sourcemaps?

I have compile on save, but I do not see sourcemaps.

Thanks!
Jon

P.S. It would also be nice if it added the sourcemaps to the project like web essentials used to.
Coordinator
Aug 7, 2013 at 10:08 PM
To get source maps, the project file you're using needs to pass in the source map enabling flags to the compiler. You can get to these by starting a new HTML5 project in VS, unloading the project and editing. You'll see under the debug build type that it will enable source maps. For your projects, you'd need to pass then when doing the compile.

Another common issue we're seeing is that the source maps are generated, but we link to them using the new //# source link style at the end of the .js rather than the old //@, so some versions of Chrome can't read them. Not sure if this is related, but handy to know when you're doing source maps.
Aug 8, 2013 at 10:34 PM
Thanks Jon!

It looks like it is working but there is a massive delay after save, before the .js and .map files are actually emitted.

If I copy the same typescript files to a new project it is fast.

The only thing that seems different between the projects is the amount of source files I have total, and some directory structure stuff.

Still digging...
Jon
Aug 9, 2013 at 12:42 AM
I ended up reverting back to 0.8.3 for now. All is well again.
Aug 21, 2013 at 6:30 PM
I seems that changing "//@" to "//#" cause debugging issue on VS.NET 2012 when we use external script.

For example, I open the page at "http://localhost:24999/Default.aspx"
In the web page, I reference to "demo.js" by the following markup code:
<script type="text/javascript" src="http://localhost/common/demo.js"></script>

Debug the page in VS.NET 2012 with IE 10

In case the source link style is "//@", everything is fine. I can debug normally. However, if the source link style if "//#", I'm not able to debug anymore.