How to execute a MEL command step by step?

How to execute a MEL command step by step?

trs_andre
Collaborator Collaborator
1,625 Views
4 Replies
Message 1 of 5

How to execute a MEL command step by step?

trs_andre
Collaborator
Collaborator

Hi everyone,

 

I'm currently developing a script in MEL which is getting kind of complex, and I'm having quite a hard time debugging it. There are some results through the code that are not right, so I have been manually running blocks of code one at a time.

 

I was wondering if there is some kind of feature in Maya/MEL that allows to make a "step-by-step" or "line-by-line" run, with the possibility of including breakpoints in the code.

 

Please let me know if there is this feature, it would help a lot!

Thanks in advance!

André Moreira

Game Developer / Technical Artist

LinkedIn

0 Likes
Accepted solutions (2)
1,626 Views
4 Replies
Replies (4)
Message 2 of 5

faline.custodio.da.silva
Alumni
Alumni
Accepted solution

@trs_andre

Thanks for posting!

 

I don't believe we have a built in way to do this with MEL. Check out this guide about Python: Tips and tricks for scripters new to Python

 

 

 


Faline Custodio Da Silva

Message 3 of 5

trs_andre
Collaborator
Collaborator

Hi @faline.custodio.da.silva!

Thank you for your answer, and apologies for the late reply!

I see... It seems I'll have to get along with Python as well then! Smiley Happy

André Moreira

Game Developer / Technical Artist

LinkedIn

0 Likes
Message 4 of 5

Anonymous
Not applicable
Accepted solution

You can use Visual Studio Code and an Extension called MayaPort or SendToMaya. Then you can debug your python code in Visual Studio Code, when Maya is running your code.

Message 5 of 5

trs_andre
Collaborator
Collaborator

Thank you for your advice!

I'll try this method as well 😉

André Moreira

Game Developer / Technical Artist

LinkedIn

0 Likes