What do you do when TouchDesigner locks up?

Hi, I’m starting out with touchdesigner, and because I’m not really sure what I’m doing I keep locking up TouchDesigner with the code I’m writing. When that happens, I can’t turn off cooking because I’m frozen out of the UI, so I just have to force-close the program and re-open, losing everything since the last save.

Is there a way to force TD to stop executing my code so that I don’t have to close and reopen the entire program?

Thank you for the help!