Debugging templates / generated HTML #365

Closed
mworrell opened this Issue Jun 19, 2012 · 4 comments

Comments

Projects
None yet
3 participants
Owner

mworrell commented Jun 19, 2012

It would be nice to have a good debugger that provides insight in which templates are selected and why.

Maybe together with a kind of inspect option to see which parts of the interface are generated by which templates (and their arguments).

A possibility is to use comment or empty script tags to mark the start and end of sections.
These can then hold an unique identifiier.
With tracing enabled we can then store information in the session, tagged with the identifier.

Any other ideas?

Owner

mmzeeman commented Jun 19, 2012

Here some feedback from my frontender.

It would be nice, during development, that there is an option to add
comments in the generated html with template/block information. Something
like this:

The arguments are not really unnecessary as you can use pprint.

Maas

It would be nice to have a good debugger that provides insight in which
templates are selected and why.

Maybe together with a kind of inspect option to see which parts of the
interface are generated by which templates (and their arguments).

A possibility is to use comment or empty script tags to mark the start and
end of sections.
These can then hold an unique identifiier.
With tracing enabled we can then store information in the session, tagged
with the identifier.

Any other ideas?


Reply to this email directly or view it on GitHub:
#365

Owner

mworrell commented Jun 19, 2012

Yes, I was thinking of something like that.

Maybe even fancier...

Just a crazy idea:

  • compile templates for 'debug' when 'debug' is set in the session.
  • add around every include an unique marker
  • store the marker with all information about the template and variables in that template
  • have a special debug window where you can browse this information
  • highlight sections in the html when selecting something in the debug window
  • and the other way around...

Does that sound feasible? :)

Owner

arjan commented Sep 12, 2012

I think start/end HTML comment tags with the template filename is already a very big help. Lets narrow the scope of this ticket to implementing that.

Owner

mworrell commented Sep 12, 2012

We can compile it into the template, using special tags.

Then later, on page generation, we can map it to any kind of embedded tag (or just ignore it).

That way we can generate it context sensitive (like html, xml, json etc)

mworrell closed this Apr 22, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment