Debugging Maple includes tools to help you debug the programs that you write. You can use the Mint utility to check a Maple source file for suspicious code that might be a source of trouble. To use mint from the athena% prompt, just type: mint filename Be sure that the file is a source file, not a .m file that is in Maple's own internal format. To help you debug programs while they are running, you use the Maple command trace and the global variable "printlevel". By setting "printlevel" to a high value, the values of statements nested in procedures and control structures is displayed, just as you see at the top level for statements you enter interactively. For example: > testproc := proc(x) if x > 2 then s := x-1; testproc(s) else x fi; end; testproc := proc(x) if 2 < x then s := x-1; testproc(s) else x fi end > printlevel := 17: > testproc(4); > testproc(4); --> enter testproc, args = 4 s := 3 --> enter testproc, args = 3 s := 2 --> enter testproc, args = 2 <-- exit testproc = 2 2 <-- exit testproc = 2 2 <-- exit testproc = 2 2 > printlevel := 1: The trace command is used to selectively trace calls and exits of a particular procedure. You use trace(procname) to turn tracing on for the procedure procname; you use untrace(procname) to disable it. For example: > trace(testproc); testproc > testproc(4); --> enter testproc, args = 4 --> enter testproc, args = 3 --> enter testproc, args = 2 2 <-- exit testproc = 2 2 <-- exit testproc = 2 2 <-- exit testproc = 2 2 > untrace(testproc); testproc > testproc(4); 2 To learn more about debugging in Maple using trace and "printlevel", see help('trace'), help('printlevel'), and the section of the First Leaves document called "Creating and debugging Maple programs". To learn more about Mint you can read the man page (once you've tapped the maple application) by typing the following command from the Glue% prompt: Glue% man mint