Visual Studio Code debug python

I’m trying to configure Visual Studio Code to write and debug my python for maya scripts.
Did someone achieve this?
I just found this Debugging Maya using Visual Studio Code
but seems it doesn’t work
Thanks

Maybe could be useful to add a step by step guide on how to configure different Ide with Maya-3ds max etc.
Or maybe we have already this in our wiki

There are threads on here for PyCharm and Wing and I think Python Tools for Visual Studio

If I remember correctly, at least one of the python plugins for VSCode used some of the remote debugging code for PTVS. So there should be some overlap there.

I messed with this for a while but I believe the final road block before I gave up was configuring the python interpreter to locate mayapy.exe. You can configure your interpreter directory but I believe the python extension natively looks for python.exe. I also tried a junction and renamed mayapy to python.exe just to test but no luck.

I tried each of the top 2 python extensions in the VS Code Marketplace.

Why use VS for Python? What does VS have that either PyCharm or Wing doesn’t provide?

PyCharm, imho, hands down the best IDE for python dev and debugging. Being able to look at my history of code, code refactoring, PEP8 compliant…there’s a lot more pluses than negatives.

1 Like

Hi Snolan,

Last time I tried PyCharm I wasn’t able to set hython as interpreter because it wasn’t a “valid python interpreter”, where I can do it in VS or eclipse. Do you know if it’s still the case ?

I haven’t tried to setup an external editor for Houdini. The little bit of python I’ve done in there is within Houdini so I’m not going to much help with that. Maybe someone else reading this can chime in. I’d be keen to know myself :slight_smile:

I’ve evaluated eclipse, pycharm and vscode for maya. While each has their strengths and weaknesses, I prefer VS Code because a) the interface, shortcuts, etc are the same as Visual Studio which is my primary IDE and b) for a script IDE it strikes a great balance of being pretty feature complete while also being very lightweight/nimble. That’s my 2c anyway

I also find that I get a lot of APPCRASH errors from mayapy.exe while building the python skeletons in PyCharm. Haven’t been able to figure out why

This should solve your debugging issue:

hope it helps :wink:

Sublime text has a Maya plugin:
https://packagecontrol.io/packages/MayaSublime

1 Like

A most excellent package. I’ve based other send_to_maya style systems on this.