# How do I debug

**URL:** <https://discourse.gohugo.io/t/how-do-i-debug/53692>\
**Category:** support\
**Created:** [February 26, 2025, 9:33am UTC](https://discourse.gohugo.io/t/how-do-i-debug/53692 "2025-02-26T09:33:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sids](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@Sids](https://discourse.gohugo.io/u/Sids)\
**Post date:** [February 26, 2025, 9:33am UTC](https://discourse.gohugo.io/t/how-do-i-debug/53692/1 "2025-02-26T09:33:09Z")

</div>

Hello all.

So a lot has changed during the past few months (a year?). Back when I was working with goHugo, I was using the 0.101.0 and now when I have to rework things out, I think the latest is 0.141.0.

I am working on VSCode with vanilla goHugo codes - I call them vanilla as these are very basic codes of goHugo and those are what have been handed to me. I understand there will be a steep learning curve now going by the fact that the versions are quite well advanced. So for now, I am only going to debug the errors instead of redoing them as per the new standards.

Now there are a few things that I would like to know -

1. The --debug and --verbose options are obsolete and not valid flags. So how do I check or rather debug? I am sure, if these things are removed, there might be some other alternates - just that I am not able to figure those out.
2. The next issue is with the --printMemoryUsage flag. It gives me output which I am unable to understand -

```auto
Alloc = 1.3 GB
TotalAlloc = 104.8 GB
Sys = 2.3 GB
NumGC = 161

```

Now I guess these should be related to memory but still I am not able to figure them out. I was searching on the forums and I did find a similar question here - [What is --printMemoryUsage detailling about?](https://discourse.gohugo.io/t/what-is-printmemoryusage-detailling-about/43402) but it does not do any good in explaining what those values actually are for.

---

<div class="post-metadata">

**Author:** ![deining](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/deining/32/13944_2.png) [@deining](https://discourse.gohugo.io/u/deining)\
**Post date:** [February 26, 2025, 10:26am UTC](https://discourse.gohugo.io/t/how-do-i-debug/53692/2 "2025-02-26T10:26:20Z")

</div>

> [@Sids](#):
>
> The --debug and --verbose options are obsolete and not valid flags. So how do I check or rather debug?

`hugo help`is your friend:

```auto
Flags:
...
      --logLevel string log level (debug|info|warn|error)
...

```

---

<div class="post-metadata">

**Author:** ![frjo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/frjo/32/18626_2.png) [@frjo](https://discourse.gohugo.io/u/frjo)\
**Post date:** [February 26, 2025, 10:30am UTC](https://discourse.gohugo.io/t/how-do-i-debug/53692/3 "2025-02-26T10:30:03Z")

</div>

> [@Sids](#):
>
> Now I guess these should be related to memory but still I am not able to figure them out.

It is likely the “Sys” (System memory) value that is most interesting.

2.3 GB indicated you are building a large site and/or process a lot of images.

My personal blog uses only 150 MB.

---

<div class="post-metadata">

**Author:** ![Sids](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@Sids](https://discourse.gohugo.io/u/Sids)\
**Post date:** [February 26, 2025, 1:00pm UTC](https://discourse.gohugo.io/t/how-do-i-debug/53692/4 "2025-02-26T13:00:10Z")

</div>

@deining

Dang! After you mentioned the

–loglevel string

I looked at the hugo server --help output more closely and found it was under the Global Flags section. I had been looking for this somewhere at the -l (way up somewhere in the middle.

Thank you for helping me with this one. Appreciated.

Thanks again!

---

<div class="post-metadata">

**Author:** ![Sids](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@Sids](https://discourse.gohugo.io/u/Sids)\
**Post date:** [February 26, 2025, 1:06pm UTC](https://discourse.gohugo.io/t/how-do-i-debug/53692/5 "2025-02-26T13:06:48Z")

</div>

> [@frjo](#):
>
> 2.3 GB indicated you are building a large site and/or process a lot of images.

Yes, they have a site which was built on goHugo 0.101.0 and results in over 10 gigs! And now I have been asked to redo it in someway that the build time and also the built size is less. It will definitely take a while as they have almost a 100 layouts+partials on code.

The figures for Alloc and Total Alloc keep changing (sometime they are high and sometime they decrease - and that is where it makes things confusing for me). Maybe they are for threads or temporary resources

I think that NumGC is more of the thread count, but somewhere towards the middle, it remains constant for a few displays.

---

<div class="post-metadata">

**Author:** ![sunwei](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/sunwei/32/18028_2.png) [@sunwei](https://discourse.gohugo.io/u/sunwei)\
**Post date:** [February 28, 2025, 6:56am UTC](https://discourse.gohugo.io/t/how-do-i-debug/53692/6 "2025-02-28T06:56:49Z")

</div>

If your main goal is to get the existing project running, using `log info` would be quite helpful. It allows you to output messages at different levels, get error details, and assist in debugging. This should be sufficient for making the necessary fixes.

> [@deining](#):
>
> ` --logLevel string log level (debug|info|warn|error)`
