Debugging network modules

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!

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

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
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