Skip to content

Instantly share code, notes, and snippets.

Last active October 19, 2023 12:49
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Maya python interactive debugging with Visual Studio Code


  1. Install ptvsd
pip install --user ptvsd
  1. Start ptvsd server in Maya
import ptvsd
ptvsd.enable_attach(address=('', 3000), redirect_output=True)
  1. VSCode debug config
    "version": "0.2.0",
    "configurations": [
            "name": "Python: Remote Attach",
            "type": "python",
            "request": "attach",
            "port": 3000,
            "host": "localhost",
            "pathMappings": [
                    "localRoot": "${workspaceFolder}",
                    "remoteRoot": "${workspaceFolder}"
  1. Start debugging
  2. Set break point
  3. Execute code in Maya
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment