VS Code and Maya2025 - newbie question

VS Code and Maya2025 - newbie question

m_hutterXDKHC
Explorer Explorer
1,413 Views
1 Reply
Message 1 of 2

VS Code and Maya2025 - newbie question

m_hutterXDKHC
Explorer
Explorer

Hey Maya community,

 

I'm new to coding. In the last years I just created small mel scripts for work but now I'm digging into Python and the OpenMaya API and started to work with VS Code.

After some tries I managed to get autocompletion working in VSC and got it connected to Maya so I can send the code via shortcut to maya and execute it.

 

I guess the MayaPy Extension from FXTD-Odyssey does this.
Except there is apparently a bug that it sets some name wrong in the json settings file.

You have to replace "python.autoComplete.extraPaths" with "python.analysis.extraPaths", then autocompletion works. This Video and its comments helped to most so far: https://www.youtube.com/watch?v=sYi1CtKdkow

But how can I now set up some form of debug help? So I can set breakpoints and watch variables in real time?
I've quite some complex code by now and for now I only debug through a lot of "print this when this happens", I could really use some better tools.

Thank you very much for reading!
Kind regards,
Martin

1,414 Views
1 Reply
Reply (1)
Message 2 of 2

2937160075
Explorer
Explorer

I debug script by PyCharm. There is a plugin in PyCharm which can attach to python.It needs run a script like 

cmds.commandPort(name=":4436")

This might help you find solution. You can attach python process by the port in vscode.

0 Likes