Debugging Your Macros Overview

Debugging is a methodical process of locating and resolving the number of "bugs" or defects in a computer program or macro. The goal being a script that will complete the task it was written to handle, with a minimum number of failures or unexpected results.

The topic of Debugging is too large and complex a topic for any single series of web page, so this material will focus on two areas. First, some general tips and suggestions on how to test and debug a macro. Second, a description of some of the common macro syntax errors and how to resolve them.

Topics

SmartCAM's macro language shares traits with many common programming and script languages. Techniques for testing and debugging these languages often apply directly or with slight modification to the same activities with MCL. Programmers wishing to invest heavily in SmartCAM automation may find purchasing or borrowing reference materials on software debugging and testing very helpful.




Trivia: The Mark II computer was an early mechanical general purpose computer; mechanical meaning it used relays and switches, rather than vacuum tubes or transistors. In 1947, while working on a Mark II at Harvard University, Rear Admiral Grace Murray Hopper found a moth stuck in a mechanical relay impeding its operation. Removing the moth she remarked that they were "debugging" the system. The remains of the moth can be found in the group's log book at the Smithsonian Institution's National Museum of American History, taped to a page with a hand written note, "First actual case of bug being found."

Admiral Hopper is also attributed with the famous quotation, "It's easier to ask forgiveness than it is to get permission."

Related Topics

Common Syntax Errors

SmartCAM Automation Overview