Skip to content

Latest commit

 

History

History

pycharmDebugging

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Maya Remote debugging with PyCharm

The following will illustrate how to setup the Python IDE PyCharm to debug Shotgun scripts running inside Autodesk Maya.

  1. First Get PyCharm Professionnal (the version of PyCharm that supports Remote Debugging) Download Pycharm.
  2. In PyCharm, setup the Maya Interpreter as the default PyCharm Interpreter (File-> Settings -> Project Interpreter).
  3. Setup a Remote Debugging Configuration: Run-> Edit Configurations. Add a Remote Debug Config. Set a port. Set Single instance. Uncheck both “Redirect to console Input” and ”Suspend after connect”.
  4. PyCharm, open the Python project you are trying to debug. Put a break point somewhere. Press the debug python. This will start the Debugging server. .
  5. Ensure your maya python path contains the path to PyCharm pydev libraries (C:\Program Files (x86)\JetBrains\PyCharm 3.4.1\helpers). Easy way to do this is to add a userSetup.py scripts in your maya config folder (C:\Users\phaneus\Documents\maya\2015-x64\scripts): .
  6. Start Maya and connect PyDev to the Remote debugger you have established in PyCharm. In order to do so, you can run a particular Python command. I wrapped this command in a Shelve so it is easier to call it.
  7. Start the script you want to debug (the script opened at step 4.). .
  8. And hope that your breakpoint will be hit!