Categories > Your tips & tricks >

Adding comments that won't mess up debug formatting

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Sarah
Date: 2012-12-26
Time: 20:34

Adding comments that won't mess up debug formatting

I use a lot of comments in my templates and I find that the debug view is often skewed by all of these "opening" tags so that my output is working steadily toward the right side of the screen and making it really difficult to find mis-matching tag errors. If you wan to use comments in your templates that you can still see in debug mode without skewing your formatting, add a closing tag inside the comment turning this:

<!-- comment goes here -->

to this:

<!-- comment goes here /> -->
This will allow the XML formatter in debug mode to correctly position the comments as self closing elements, making those mis-matching start and end tag error easier to track down.

Hope that helps someone.
By: Skrol29
Date: 2012-12-28
Time: 02:06

Re: Adding comments that won't mess up debug formatting

Thanks for sharing this tip.

You are talking about the debug mode of OpenTBS, aren't you ?
By: Sarah
Date: 2012-12-28
Time: 02:28

Re: Adding comments that won't mess up debug formatting

Yes, the OpenTBS Debug mode.