Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
991 lars 1
# Debugging Console
148 lars 2
 
3
There is a debugging console included with Smarty. The console informs
4
you of all the [included](./language-builtin-functions/language-function-include.md) templates,
5
[assigned](../programmers/api-functions/api-assign.md) variables and
6
[config](./language-variables/language-config-variables.md) file variables for the current
7
invocation of the template. A template file named `debug.tpl` is
8
included with the distribution of Smarty which controls the formatting
9
of the console.
10
 
11
Set [`$debugging`](../programmers/api-variables/variable-debugging.md) to TRUE in Smarty, and if needed
12
set [`$debug_tpl`](../programmers/api-variables/variable-debug-template.md) to the template resource
13
path to `debug.tpl` (this is in [`SMARTY_DIR`](../programmers/smarty-constants.md) by
14
default). When you load the page, a Javascript console window will pop
15
up and give you the names of all the included templates and assigned
16
variables for the current page.
17
 
18
To see the available variables for a particular template, see the
19
[`{debug}`](./language-builtin-functions/language-function-debug.md) template function. To disable the
20
debugging console, set [`$debugging`](../programmers/api-variables/variable-debugging.md) to FALSE. You
21
can also temporarily turn on the debugging console by putting
22
`SMARTY_DEBUG` in the URL if you enable this option with
23
[`$debugging_ctrl`](../programmers/api-variables/variable-debugging-ctrl.md).
24
 
25
> **Note**
26
>
27
> The debugging console does not work when you use the
28
> [`fetch()`](../programmers/api-functions/api-fetch.md) API, only when using
29
> [`display()`](../programmers/api-functions/api-display.md). It is a set of javascript statements
30
> added to the very bottom of the generated template. If you do not like
31
> javascript, you can edit the `debug.tpl` template to format the output
32
> however you like. Debug data is not cached and `debug.tpl` info is not
33
> included in the output of the debug console.
34
 
35
> **Note**
36
>
37
> The load times of each template and config file are in seconds, or
38
> fractions thereof.
39
 
40
See also [troubleshooting](../appendixes/troubleshooting.md).