# running ansible-playbook from a debugger

**URL:** <https://forum.ansible.com/t/running-ansible-playbook-from-a-debugger/17670>\
**Category:** Ansible Project\
**Created:** [March 5, 2015, 12:19am UTC](https://forum.ansible.com/t/running-ansible-playbook-from-a-debugger/17670 "2015-03-05T00:19:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kesten\_Broughton2](https://avatars.discourse-cdn.com/v4/letter/k/ecc23a/32.png) [@Kesten\_Broughton2](https://forum.ansible.com/u/Kesten_Broughton2)\
**Post date:** [March 5, 2015, 12:19am UTC](https://forum.ansible.com/t/running-ansible-playbook-from-a-debugger/17670/1 "2015-03-05T00:19:01Z")

</div>

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/](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.

```auto
- 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)

```auto
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?

```

```auto
I did do the source ./env_setup and suggested.

```

```auto

```

```auto
kesten 

```

```auto

```

---

<div class="post-metadata">

**Author:** ![Mirko\_Friedenhagen](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@Mirko\_Friedenhagen](https://forum.ansible.com/u/Mirko_Friedenhagen)\
**Post date:** [March 5, 2015, 7:29pm UTC](https://forum.ansible.com/t/running-ansible-playbook-from-a-debugger/17670/2 "2015-03-05T19:29:42Z")

</div>

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
