Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Debugging 3ds Max Python code from VS Code

Debugging 3ds Max Python code from VS Code

mustafapassahci
Contributor Contributor
2,180 Views
3 Replies
Message 1 of 4

Debugging 3ds Max Python code from VS Code

mustafapassahci
Contributor
Contributor

I am trying to run this example.https://help.autodesk.com/view/MAXDEV/2022/ENU/?guid=MAXDEV_Python_tutorials_creating_the_dialog_htm...

 

Everything works fine until "Wait, I see problems with my import statements" section.

Even if I follow those steps, I am still seeing import error, like this:

mustafapassahci_0-1643876933376.png

Is this normal case? I tried to change "python interpreter" to the max's python with this way:

mustafapassahci_1-1643877073481.png

and then my problem disappears but this time vs code can't detect PySide2 module:

mustafapassahci_2-1643877244733.png

plus pyside's "autocomplete" tool is gone. I can't see pymsx's intellisense either way.
I added this code in settings.json but example using 2021's path. Should I install max 2021?

 

 

 

 

"python.pythonPath": "C:\\Program Files\\Autodesk\\3ds Max 2022\\Python37\\python.exe",
"python.autoComplete.extraPaths": ["C:\\Program Files\\Autodesk\\3ds Max 2022\\Python37"]

 

 

 


at the end I want to see this in vs code as well:

mustafapassahci_3-1643877635982.png

0 Likes
Accepted solutions (1)
2,181 Views
3 Replies
Replies (3)
Message 2 of 4

458569
Autodesk
Autodesk

Hello Mustafa,

Thanks a lot for reporting this. I juste tried it on my side and to make it work I had to set it this way:

"python.autoComplete.extraPaths": ["C:\\Program Files\\Autodesk\\3ds Max 2022\\Python37\\Lib\\site-packages"]

Does this solve the issue for you? (if it does I will make sure the doc is updated accordingly).

Thanks again

Hugo

Message 3 of 4

mustafapassahci
Contributor
Contributor

Import error disappeared but intellisense still doesn't appear. Is it normal for it not to appear?

mustafapassahci_1-1644258252660.png

 

 

my settings.json:

mustafapassahci_2-1644258329313.png

 

my interpreter:

mustafapassahci_4-1644258360194.pngmustafapassahci_5-1644258370250.png

 

0 Likes
Message 4 of 4

458569
Autodesk
Autodesk
Accepted solution

Hello Mustafa,

You should see a few things like animate (like... pymxs.an should suggest autocompletion).

This is the only thing that will currently work.

So it is "normal" (I should probably use the word "expected") that pymxs.ru does not suggest autocomplete to "runtime".