# A debugging partial

**URL:** <https://discourse.gohugo.io/t/a-debugging-partial/56078>\
**Category:** tips & tricks\
**Created:** [October 12, 2025, 4:15pm UTC](https://discourse.gohugo.io/t/a-debugging-partial/56078 "2025-10-12T16:15:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![erlebach](https://avatars.discourse-cdn.com/v4/letter/e/ebca7d/32.png) [@erlebach](https://discourse.gohugo.io/u/erlebach)\
**Post date:** [October 12, 2025, 4:15pm UTC](https://discourse.gohugo.io/t/a-debugging-partial/56078/1 "2025-10-12T16:15:04Z")

</div>

I required a means to print all variables. With the help of AI, I constructed such a partial, which I share here. Simply add {{ partial [debug-page-vars.html](https://drive.google.com/file/d/1w8CJornBYwlLVJrxJQFrYRwpchO-SndM/view?usp=share_link) . }} where you want a list of all your variables to be printed (Page, Site, front matter, Params). Enjoy!

P.S. It would be nice if Hugo made available a comprehensive set of debugging tools out of the box. Two features not available are: 1) the search order that determined which template file was chosen, and 2) the path to the template file used to construct the displayed web page.

---

<div class="post-metadata">

**Author:** ![chrillek](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/chrillek/32/19797_2.png) [@chrillek](https://discourse.gohugo.io/u/chrillek)\
**Post date:** [October 13, 2025, 12:26pm UTC](https://discourse.gohugo.io/t/a-debugging-partial/56078/2 "2025-10-13T12:26:58Z")

</div>

> [@erlebach](#):
>
> the path to the template file used to construct the displayed web page.

I digest reading the documentation‘s description of `templates`.

---

<div class="post-metadata">

**Author:** ![erlebach](https://avatars.discourse-cdn.com/v4/letter/e/ebca7d/32.png) [@erlebach](https://discourse.gohugo.io/u/erlebach)\
**Post date:** [October 13, 2025, 2:08pm UTC](https://discourse.gohugo.io/t/a-debugging-partial/56078/3 "2025-10-13T14:08:44Z")

</div>

I don’t understand what you mean by “digest reading the documentation …”. Thanks!

---

<div class="post-metadata">

**Author:** ![chrillek](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/chrillek/32/19797_2.png) [@chrillek](https://discourse.gohugo.io/u/chrillek)\
**Post date:** [October 13, 2025, 2:39pm UTC](https://discourse.gohugo.io/t/a-debugging-partial/56078/4 "2025-10-13T14:39:16Z")

</div>

My phone trying to be smart. Read „I suggest“. There’s a function or method (I never know which is which) called `templates` that provides the information you’re looking for.

---

<div class="post-metadata">

**Author:** ![erlebach](https://avatars.discourse-cdn.com/v4/letter/e/ebca7d/32.png) [@erlebach](https://discourse.gohugo.io/u/erlebach)\
**Post date:** [October 13, 2025, 10:48pm UTC](https://discourse.gohugo.io/t/a-debugging-partial/56078/5 "2025-10-13T22:48:10Z")

</div>

Ok, I’ll check it out. Note that my function prints all page variables, all site variables, and much more. All at once.

---

<div class="post-metadata">

**Author:** ![erlebach](https://avatars.discourse-cdn.com/v4/letter/e/ebca7d/32.png) [@erlebach](https://discourse.gohugo.io/u/erlebach)\
**Post date:** [October 14, 2025, 11:15am UTC](https://discourse.gohugo.io/t/a-debugging-partial/56078/6 "2025-10-14T11:15:51Z")

</div>

Thanks for the tip! I enhanced my debugger, and added css-related info as well.
