- VSCode version 1.23.1
- Create launch.json for python attach
- Make sure ptvsd version is 3.0.0
pip install ptvsd==3.0.0
{
"name": "Python: Attach",
"type": "python",
"request": "attach",
"localRoot": "${workspaceFolder}",
"remoteRoot": "${workspaceFolder}",
"port": 3000,
"secret": "ansible",
"host": "127.0.0.1"
}
import ptvsd
ptvsd.enable_attach(secret="ansible", address = ('127.0.0.1', 3000))
ptvsd.wait_for_attach()
ptvsd.break_into_debugger()
ansible all -i 'localhost,' -u username -c local -m homebrew -a "package=vim" -e "ansible_python_interpreter=/path/to/interpreter"
For me this doesn't work as debugger is telling me it cant enter zip file. How you worked around this?