| 
									
										
										
										
											2004-03-28 15:15:38 +00:00
										 |  |  | <?xml version="1.0" encoding="iso-8859-1"?> | 
					
						
							|  |  |  | <!-- $Revision$ --> | 
					
						
							| 
									
										
										
										
											2004-04-18 17:30:04 +00:00
										 |  |  | <chapter id="chapter.debugging.console"> | 
					
						
							|  |  |  |  <title>Debugging Console</title> | 
					
						
							|  |  |  |  <para> | 
					
						
							|  |  |  |   There is a debugging console included with Smarty. The console informs you | 
					
						
							| 
									
										
										
										
											2005-05-23 15:43:01 +00:00
										 |  |  |   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 | 
					
						
							| 
									
										
										
										
											2004-04-18 17:30:04 +00:00
										 |  |  |   for the current invocation of the template. A template named "debug.tpl" is | 
					
						
							|  |  |  |   included with the distribution of Smarty which controls the formatting of | 
					
						
							| 
									
										
										
										
											2005-05-23 15:43:01 +00:00
										 |  |  |   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 | 
					
						
							| 
									
										
										
										
											2004-04-18 17:30:04 +00:00
										 |  |  |   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> | 
					
						
							| 
									
										
										
										
											2005-05-23 15:43:01 +00:00
										 |  |  |   template function. To disable the debugging console, set | 
					
						
							|  |  |  |   <link linkend="variable.debugging">$debugging</link> to | 
					
						
							| 
									
										
										
										
											2004-04-18 17:30:04 +00:00
										 |  |  |   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> | 
					
						
							| 
									
										
										
										
											2005-05-23 15:43:01 +00:00
										 |  |  |    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 | 
					
						
							| 
									
										
										
										
											2004-04-18 17:30:04 +00:00
										 |  |  |    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> | 
					
						
							| 
									
										
										
										
											2005-05-24 14:01:49 +00:00
										 |  |  |     <para> | 
					
						
							|  |  |  |     See also | 
					
						
							|  |  |  |     <link linkend="troubleshooting">troubleshooting</link>, | 
					
						
							|  |  |  |     <link linkend="variable.error.reporting">$error_reporting</link> | 
					
						
							|  |  |  |     and | 
					
						
							|  |  |  |     <link linkend="api.trigger.error">trigger_error()</link>. | 
					
						
							|  |  |  |    </para> | 
					
						
							| 
									
										
										
										
											2004-03-28 15:15:38 +00:00
										 |  |  | </chapter> | 
					
						
							| 
									
										
										
										
											2004-04-14 15:53:39 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2004-03-28 15:15:38 +00:00
										 |  |  | <!-- 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 | 
					
						
							| 
									
										
										
										
											2004-04-14 15:53:39 +00:00
										 |  |  | --> | 
					
						
							| 
									
										
										
										
											2005-05-23 15:43:01 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 |