top of page
  • Writer's pictureFernanda

Debugging in Maya with Stack Trace

Updated: May 21, 2021

Did you know that having this option enabled in your script editor will make your life a lot easier?

It might seem obvious to point this out. But if we all assume something is obvious and don't talk about it, how are less experienced game devs supposed to learn it? School doesn't teach you everything!

The Show Stack Trace option enables a feature in the script editor that gives you a more detailed error message. It shows you which line and/or functions the error happened.


1 def doSomething(a):
2   a += 1 
3   print "\nI'm doing %s somethings" %a
5 doSomething(4)

If I run this, it correctly returns:

I'm doing 5 somethings

To demonstrate, I'm going to run doSomething("ohno") :

We can't add a string and an integer together, so Stack Trace tells me that when it tried to run the function doSomething() on line 5, it encountered an TypeError on line 2 (a += 1).

I hope this helps!


352 views0 comments

Recent Posts

See All

Sometimes I get emails from students who want to learn more about Tech Art. Many of them are enrolled in a game development college program and are in need of extra advice and resources. If the studen

bottom of page