When I create a minified file with sourcemapping enabled, debugging will hang on the creation of the minified file. I can find a reference to this problem in the [WebEssentials 2012 source code](https://github.com/madskristensen/WebEssentials2012/blob/31c2b578efed1eaf941c58fae0a88dc97e19cfec/EditorExtensions/Commands/JavaScript/JavaScriptSaveListener.cs#L91), but I cannot find any other mention of this problem...
This is a piece of code that will reproduce the bug (the debugger hangs on the minifier.MinifyJavaScript() call):
```
var mapBuilder = new StringBuilder();
using (var writer = new StringWriter(mapBuilder))
using (var sourceMap = new V3SourceMap(writer))
{
var minifier = new Minifier();
var settings = new CodeSettings
{
EvalTreatment = EvalTreatment.MakeImmediateSafe,
PreserveImportantComments = false,
SymbolsMap = sourceMap,
TermSemicolons = true
};
sourceMap.StartPackage(scriptPath, mapPath);
minified = minifier.MinifyJavaScript(concatedScripts, settings);
}
```
This only happens if files are concated with the ```///#source 1 1 ``` comment.
Comments: ** Comment from web user: benmccallum **
This is a piece of code that will reproduce the bug (the debugger hangs on the minifier.MinifyJavaScript() call):
```
var mapBuilder = new StringBuilder();
using (var writer = new StringWriter(mapBuilder))
using (var sourceMap = new V3SourceMap(writer))
{
var minifier = new Minifier();
var settings = new CodeSettings
{
EvalTreatment = EvalTreatment.MakeImmediateSafe,
PreserveImportantComments = false,
SymbolsMap = sourceMap,
TermSemicolons = true
};
sourceMap.StartPackage(scriptPath, mapPath);
minified = minifier.MinifyJavaScript(concatedScripts, settings);
}
```
This only happens if files are concated with the ```///#source 1 1 ``` comment.
Comments: ** Comment from web user: benmccallum **
+1