running ansible-playbook from a debugger

Hi, I have multiple installs of ansible (brew, pip and git source) on my mac.

I recently needed to debug some things and found it easy to do, with one exception.

I’ve detailed it here.
https://kestenbroughton2015.wordpress.com/running-ansible-playbook-from-inside-a-debugger/

The upshot is, i had to modify a line in ansible-playbook so that the correct distro of ansible is found.

- sys.path.append(local_module_path)
+ sys.path = [local_module_path]  + sys.path

WIthout it, i got an error that module ‘utils’ has no method parse_extra_vars from line ~ 143

extra_vars = utils.parse_extra_vars(options.extra_vars, vault_pass)

QUestion.  Am I missing something from my setup.  Is there a way to prep the IDE so that I don't have to hack the ansible code?
I did do the source ./env_setup and suggested.

kesten 

Hello Kesten,

I would suggest you use virtualenv and pip, pip may install from git checkouts as well.

Then point your IDE to your virtualenv, at least Intellij CE with the python plugin or Pycharme are able to register virtualenvs as SDK.

Homebrew is the one defaulting to the stable environment, once you parse the activate script of virtualenv, the devel version is used.

Regards
Mirko