In regards to the 'annoying to debug' part of javascript compression, I've got two things happening in my code, only when the project is in debug I'll serve out the non-compressed files, this way I don't have to re-build the javascript compression project after any change to the files. Additionally, if you're using IE (and like it?), IE9 has a 'pretty-print' feature for javascript debugging, which should uncompress (obviously won't fix obfuscation though).
An MSBuild task in visual studio combined with the YUI Compressor for .NET can do javascript/CSS compression and minification for you. I have a 'static' project, where my javascript, CSS, and images sit, so when I modify my javascript/CSS I build this project and it uses YUI compressor to combine and minify my files. This way I can can separate my javascript and css files, but serve them out together without having to use a manual tool to compress them.
In the Project properties, under the Build Events, I put this in the "Post-build event command line":
/p:SourceLocation="$(ProjectDir)"
$(MSBuildBinPath)\msbuild.exe "$(ProjectDir)MSBuild\MSBuild.xml"
A sample MSBuild.xml file: (mine has 3 Compressor Tasks
so that I can get specific groups of files)
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/MsBuild/2003">
<UsingTask
TaskName="CompressorTask"
AssemblyFile="Yahoo.Yui.Compressor.dll" />
<Target Name="MyTaskTarget">
<ItemGroup>
<CssFiles Include="$(SourceLocation)..\css\Style.css"/>
<CssFiles Include="$(SourceLocation)..\css\StylePrint.css" />
<JavaScriptFiles Include="$(SourceLocation)..\scripts\general\*.js" />
</ItemGroup>
<CompressorTask
CssFiles="@(CssFiles)"
DeleteCssFiles="false"
CssOutputFile="$(SourceLocation)..\css\Style.min.css"
CssCompressionType="YuiStockCompression"
JavaScriptFiles="@(JavaScriptFiles)"
ObfuscateJavaScript="True"
PreserveAllSemicolons="False"
DisableOptimizations="Nope"
EncodingType="Default"
DeleteJavaScriptFiles="false"
LineBreakPosition="-1"
JavaScriptOutputFile="$(SourceLocation)..\scripts\general.min.js"
LoggingType="ALittleBit"
ThreadCulture="en-us"
IsEvalIgnored="false"
/>
</Target>
</Project>
Here is another guide to do compression/minification as MSBuild task
Hope that helps