I’ve been working on a live debugger for Ansible for use in Visual Studio Code or other Debug Adapter Protocol clients. I’ve got a brief demo video with some of the features at https://youtu.be/pd2XGRbmt9A. You can also have a look at the basic docs for it at Debug Adapter | ansibug.
Currently there is a PR for adding this to the official Ansible VSCode extension but you can try out the changes by following the guide in Debug Adapter | ansibug. As this relies on the Debug Adapter Protocol from Microsoft it should also be possible to use this with clients like vim or emacs but this is not something I’ve tried out yet.
Please keep in mind this is a preview and there is still work needed before this can be included by default but now is a great time to try it out and provide your thoughts and concerns about how it current works and how it could be improved.
That’s. AMAZING!
I’ve been waiting for this for years. Will it support also debugging of Python modules on remote? I remember doing it once on Vscode or Pycharm, but since then I lost all track of hacks and tricks I had to use for that.
Great work and it definitely must be part of the extensions!
Will it support also debugging of Python modules on remote?
Unfortunately no it’s purely limited to local playbook files. I think VSCode now supports multiple debug adapters but the tricky thing will be how to tunnel the debug traffic from the remote. Might be a future goal as this would be great to see alongside PowerShell modules at some point.