# Enabling display.debug when using molecule?

**URL:** <https://forum.ansible.com/t/enabling-display-debug-when-using-molecule/44306>\
**Category:** Get Help\
**Created:** [August 15, 2025, 9:13pm UTC](https://forum.ansible.com/t/enabling-display-debug-when-using-molecule/44306 "2025-08-15T21:13:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![basictheprogram](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/basictheprogram/32/9260_2.png) [@basictheprogram](https://forum.ansible.com/u/basictheprogram)\
**Post date:** [August 15, 2025, 9:13pm UTC](https://forum.ansible.com/t/enabling-display-debug-when-using-molecule/44306/1 "2025-08-15T21:13:34Z")

</div>

How do I get the display.debug() output when I am running molecule tests?

I thought

`$ molecule converge – -vvvv`

Or

`ANSIBLE_DEBUG=True molecule converge – -vvvv`

Neither seem to work.

---

<div class="post-metadata">

**Author:** ![chris](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/chris/32/293_2.png) [@chris](https://forum.ansible.com/u/chris)\
**Post date:** [August 16, 2025, 9:27am UTC](https://forum.ansible.com/t/enabling-display-debug-when-using-molecule/44306/2 "2025-08-16T09:27:38Z")

</div>

I set the `MOLECULE_VERBOSITY` env var to a number to match the number of `-v`’s one would use with `ansible-playbook` for verbose output.

---

<div class="post-metadata">

**Author:** ![basictheprogram](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/basictheprogram/32/9260_2.png) [@basictheprogram](https://forum.ansible.com/u/basictheprogram)\
**Post date:** [August 16, 2025, 9:01pm UTC](https://forum.ansible.com/t/enabling-display-debug-when-using-molecule/44306/3 "2025-08-16T21:01:30Z")

</div>

The display.debug() inside the ansible-core python code. For example in `ansible/plugin/action/ __init__.py:__low_level_execute_command()` there is

```auto

display.debug("_low_level_execute_command(): starting")

```

I have tried

```auto
display = Display(verbosity=2)

```

and

```auto
export ANSIBLE_DEBUG=1

```

And running with `-vvv` and `-vvvv` and put `C.LOG_VERBOSITY = 2` into the module, editing `ansible/utils/display.py:Display()` hard coding in the verbosity

```auto
    def __init__ (self, verbosity: int = 3) -> None:

```

None of it has worked.

---

<div class="post-metadata">

**Author:** ![chris](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/chris/32/293_2.png) [@chris](https://forum.ansible.com/u/chris)\
**Post date:** [August 17, 2025, 6:43am UTC](https://forum.ansible.com/t/enabling-display-debug-when-using-molecule/44306/4 "2025-08-17T06:43:38Z")

</div>

Have you tried setting the `MOLECULE_VERBOSITY` environmental variable to a number that matches the number of `v`’s you would use with `ansible-playbook`, for example:

```bash
export MOLECULE_VERBOSITY=3

```

It doesn’t appear to be very well documented, but this is the way to do it AFAIK:

> **[Build software better, together](https://github.com/search?q=repo%3Aansible%2Fmolecule%20MOLECULE_VERBOSITY&type=code)**
>
> GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.

But perhaps I have failed to understand your question?
