picocms / Pico

Pico is a stupidly simple, blazing fast, flat file CMS.
http://picocms.org/
MIT License
3.81k stars 616 forks source link

What is debug mode? #554

Closed Discostu36 closed 3 years ago

Discostu36 commented 3 years ago

This option in config.yml needs documentation:

debug: ~                            # Set this to true to enable Pico's debug mode

I couldn't find any information about what debug mode does. Enabling it doesn't seem to change anything for me.

PhrozenByte commented 3 years ago

It enables Twig's debug mode.

Discostu36 commented 3 years ago

If it should do what this website is describing, it doesn't. I don't have any comments in my source code.

PhrozenByte commented 3 years ago

If you think this is useful in general and not just for Drupal, you should suggest this to twigphp/Twig.

Discostu36 commented 3 years ago

Sorry, I still don't get it. My question still is: What does Twig's debug mode do in Pico CMS? If it's not writing comments into the DOM like in Drupal, what does it do instead?

PhrozenByte commented 3 years ago

Pico is not Drupal, so you can't assume random Drupal features to be supported in Pico. This is a Drupal-specific feature. If you think that Twig should include such debug comments when Twig's debug mode is enabled, you should suggest the Twig developers to add such a feature to Twig. Pico just enables Twig's debug mode, no more, no less. If the Twig developers decide to add such a feature it will also be present in Pico (and any other project using Twig). See https://twig.symfony.com/doc/1.x/api.html#environment-options and https://twig.symfony.com/doc/1.x/functions/dump.html

Discostu36 commented 3 years ago

I'm more confused than ever not that I have seen that the file also has this in line 24:

twig_config:                        # Twig template engine config
    [...]
    debug: ~                        # Enable Twig's debug mode

Do both options do the same? Or is the debug option we talked about above something else than Twig's debug mode?

And one thing about the Label for this issue: Sure, somehow this is a question. But what I actually want to archive is that the documentation gets improved.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! :+1:

dcrobertson01 commented 3 years ago

So how do we debug pico?