Seperation of files in Debug?

Feb 12, 2010 at 2:30 PM

Hi,

Is there a way to disable the combination of files in debug mode?  It'd be useful to be able to track which file I'm trying to look at in Firebug and I've currently got one file with thousands of lines!!

Cheers

L

Coordinator
Feb 13, 2010 at 2:11 PM

Hi,

As of currently, that's not possible.  Think of one possible way Combres is used, e.g. <script src="<%= Url.CombresUrl("set") %>" ... />, I'm not so sure if this request can be reasonably implemented at all (e.g. no matter what URL Combres generates, it's just 1 URL in this case).  What if Combres generates some comment before a file in debug mode, e.g. <!-- this is abc.js -->, does that help?

Regards,

Buu

Feb 15, 2010 at 7:51 AM

Hi Buu,

Ah yes of course, I can see what you mean about the single file.  I think the comments could help a little towards this in debug mode at least.

Cheers

L

Feb 15, 2010 at 1:55 PM

You could also expand your HtmlHelper to take a boolean parameter specyfying whether to output the script-tags as well. Ie.

Url.CombresUrl("set") = /.../set.js

Url.CombresUrl("set", true) = <script src="/.../set.js" ... />

the first method off course calls the second with false as input. The body would then look something like

ComresUrl(string setName, bool outputScriptTags) {

   if (outputScriptTags && HttpContext.Current.IsDebug) {

      foreach (var set in GetSet(setName)) {

          writeScriptTag(set);

      }

}

 

 

Coordinator
Feb 19, 2010 at 2:31 AM

@burningice: if I understand you correctly, the current CombresLink(...) extension method already does what the proposed Url.CombresUrl("set", true) does.

Coordinator
Feb 19, 2010 at 2:32 AM

@L: I've added a ticket here for that: http://combres.codeplex.com/WorkItem/View.aspx?WorkItemId=6056

Coordinator
Feb 25, 2010 at 11:25 AM

The latest code commit already implements this feature (append comment identifying the current resource during debug mode).  Hope it helps.

Coordinator
Feb 26, 2010 at 7:03 AM

An alternative feature facilitating debugging is just implemented.  See: http://combres.codeplex.com/WorkItem/View.aspx?WorkItemId=6088# and http://combres.codeplex.com/SourceControl/list/changesets (changeset #37361)