Showing posts from April, 2017

Debugging Maya using Visual Studio Code

I've been testing debugging Maya Python scripts lately. Mostly focusing on free IDEs or editors such as PyCharm. So far this is one requires less setup in my opinion.
This is mostly based off the remote python debugging functionality described here: Download and install Microsoft's free Visual Studio CodeInstall the official Python Extension  Download ptvsd package as a zip Extract the ptvsd folder into your Maya scripts folder Open Maya and run import ptvsd ptvsd.enable_attach("my_secret", address= ('', 3000)) Back in VSC, switch to Attach (remote debug) in the debug configurations and start it
You are now ready to debug.  Note: here is the settings I use in launch.json

Add break points, run your code and it should stop and populate the debug section of Visual Studio code when it hits a break point