Files
smarty/docs/en/designers/chapter-debugging-console.xml
2005-05-23 15:43:01 +00:00

73 lines
2.6 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<chapter id="chapter.debugging.console">
<title>Debugging Console</title>
<para>
There is a debugging console included with Smarty. The console informs you
of all the
<link linkend="language.function.include">included</link> templates,
<link linkend="api.assign">assigned</link> variables and
<link linkend="language.config.variables">config</link>
file variables
for the current invocation of the template. A template named "debug.tpl" is
included with the distribution of Smarty which controls the formatting of
the console. Set
<link linkend="variable.debugging">$debugging</link> to true in Smarty, and if needed set
<link linkend="variable.debug.tpl">$debug_tpl</link>
to the template resource path for debug.tpl (this is in
<link linkend="constant.smarty.dir">SMARTY_DIR</link> by
default.) When you load the page, a javascript console window should pop up
and give you the names of all the included templates and assigned variables
for the current page. To see the available variables for a particular
templates, see the <link linkend="language.function.debug">{debug}</link>
template function. To disable the debugging console, set
<link linkend="variable.debugging">$debugging</link> to
false. You can also temporarily turn on the debugging console by putting
SMARTY_DEBUG in the URL if you enable this option with <link
linkend="variable.debugging.ctrl">$debugging_ctrl</link>.
</para>
<note>
<title>Technical Note</title>
<para>
The debugging console does not work when you use the
<link linkend="api.fetch">fetch()</link>
API, only when using
<link linkend="api.display">display()</link>.
It is a set of javascript statements added
to the very bottom of the generated template. If you do not like javascript,
you can edit the debug.tpl template to format the output however you like.
Debug data is not cached and debug.tpl info is not included in the output of
the debug console.
</para>
</note>
<note>
<para>
The load times of each template and config file are in seconds, or
fractions thereof.
</para>
</note>
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->