Home:ALL Converter>Debugging minified JavaScript in Visual Studio with sourcemaps

Debugging minified JavaScript in Visual Studio with sourcemaps

Ask Time:2015-03-30T17:32:45         Author:Ehsan Abidi

Json Formatter

We have an ASP.NET 3.5 (IIS Application Pool 2.0) webSite. We are developing it with Visual Studio 2013 update4 in Windows8.1.
The problem is that: When I minify JavaScript files (with Web Essentials extension) and change the aspx files to use the newly created min.js files, the debugger of Visual Studio or any other browser wont works correctly. We expected that we work on the original js file (put a breakpoint etc. . .), and web browser runs it's minified min.js file (since relations exist in the map file), but in Visual Studio my break points turns into hollow yellow circle (with Tooltip: The breakpoint will not currently be hit. No Symbols have been . . .) even after I refresh the page with hitting Ctrl+F5 and when debugging in Chrome many weird problems happens like: variable's value cannot be read, break point do not hits in right place and . . .
What I try so far is cleaning, rebuilding the web project in Visual Studio, reset the Internet Explorer and Chrome settings and updating Visual Studio and Web Essentials extension and minify the JavaScript Files again with new version.

Author:Ehsan Abidi,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/29342738/debugging-minified-javascript-in-visual-studio-with-sourcemaps
yy