# Debugging network modules

**URL:** <https://forum.ansible.com/t/debugging-network-modules/27619>\
**Category:** Ansible Developer\
**Created:** [May 24, 2018, 6:25pm UTC](https://forum.ansible.com/t/debugging-network-modules/27619 "2018-05-24T18:25:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikinggeek](https://avatars.discourse-cdn.com/v4/letter/v/e19b73/32.png) [@vikinggeek](https://forum.ansible.com/u/vikinggeek)\
**Post date:** [May 24, 2018, 6:25pm UTC](https://forum.ansible.com/t/debugging-network-modules/27619/1 "2018-05-24T18:25:34Z")

</div>

Totally beginner writing network modules to manage our routers and switches, and I need some help:

The project I’m working on utilizes the network\_cli module and augment it with terminal, action, etc modules to check state, upgrade and configure the devices. It sort of works, but I need to get better debug output from ansible itself to understand what is going on.

In the ansible code I see display.vvvv(… , but I’m only getting limited printout to the terminal window. In the ansible.log there is more info, but the details from the display.vvvv statements in the ansible code is nowhere to be found. What am I not getting???

I’m particularity interested in the debug output from the network\_cli module. I invoke the test task with ansible-playbook -vvvv. Running ansible 2.5.3 on MacOS.

Any help would be appreciated!

---

<div class="post-metadata">

**Author:** ![ganeshrn](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ganeshrn/32/1021_2.png) [@ganeshrn](https://forum.ansible.com/u/ganeshrn)\
**Post date:** [June 5, 2018, 5:27pm UTC](https://forum.ansible.com/t/debugging-network-modules/27619/2 "2018-06-05T17:27:28Z")

</div>

If you are working on adding new network modules it is preferable to work on devel branch.  
Please refer [http://docs.ansible.com/ansible/latest/dev\_guide/developing\_modules\_general.html#common-environment-setup](http://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#common-environment-setup)

to setup your environment.  
To enable the debug logs refer [https://docs.ansible.com/ansible/2.4/network\_debug\_troubleshooting.html#enabling-networking-logging-and-how-to-read-the-logfile](https://docs.ansible.com/ansible/2.4/network_debug_troubleshooting.html#enabling-networking-logging-and-how-to-read-the-logfile)  
and to understand code flow better you can also add more debug logs using display.debug() statements in lib/ansible/plugins/connection/network\_cli.py

Hope this helps.

Regards,  
Ganesh
