mirror of
				https://github.com/smarty-php/smarty.git
				synced 2025-10-31 12:21:36 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			86 lines
		
	
	
		
			3.2 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			86 lines
		
	
	
		
			3.2 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 file
 | |
|   named <literal>debug.tpl</literal> is included with the distribution of
 | |
|   Smarty which controls the formatting of the console.
 | |
|   </para>
 | |
|   <para>
 | |
|   Set  <link linkend="variable.debugging"><parameter>$debugging</parameter></link>
 | |
|   to &true; in Smarty, and if needed set <link linkend="variable.debug.tpl">
 | |
|   <parameter>$debug_tpl</parameter></link> to the template resource path to
 | |
|   <literal>debug.tpl</literal> (this is in <link linkend="constant.smarty.dir">
 | |
|   <constant>SMARTY_DIR</constant></link> by default).
 | |
|   When you load the page, a Javascript console window will pop up
 | |
|   and give you the names of all the included templates and assigned variables
 | |
|   for the current page.</para>
 | |
|   <para>To see the available variables for a particular
 | |
|   template, see the <link linkend="language.function.debug">
 | |
|   <varname>{debug}</varname></link> template function.
 | |
|   To disable the debugging console, set
 | |
|   <link linkend="variable.debugging"><parameter>$debugging</parameter></link> to
 | |
|   &false;. You can also temporarily turn on the debugging console by putting
 | |
|   <literal>SMARTY_DEBUG</literal> in the URL if you enable this option with
 | |
|   <link linkend="variable.debugging.ctrl"><parameter>$debugging_ctrl</parameter>
 | |
|   </link>.
 | |
|  </para>
 | |
|  <note>
 | |
|   <title>Technical Note</title>
 | |
|   <para>
 | |
|    The debugging console does not work when you use the
 | |
|    <link linkend="api.fetch"><varname>fetch()</varname></link>
 | |
|    API, only when using  <link linkend="api.display">
 | |
|    <varname>display()</varname></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 <literal>debug.tpl</literal> template to format the output
 | |
|    however you like.  Debug data is not cached and <literal>debug.tpl</literal>
 | |
|     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>
 | |
|     <para>
 | |
|     See also
 | |
|     <link linkend="troubleshooting">troubleshooting</link>,
 | |
|     <link linkend="variable.error.reporting">
 | |
|     <parameter>$error_reporting</parameter></link>
 | |
|     and
 | |
|     <link linkend="api.trigger.error"><varname>trigger_error()</varname></link>.
 | |
|    </para>
 | |
| </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
 | |
| -->
 | |
| 
 | |
| 
 |