LispWorks IDE User Guide > 24 The Stepper > 24.2 Simple examples

NextPrevUpTopContentsIndex

24.2.1 Standalone use of the stepper

  1. Compile and load the demo system defined in the LispWorks library file examples/tools/demo-defsys.lisp . First, load this file to define the system. Then evaluate in the Listener:
  2. (compile-system "demo" :load t)

    Note: for another way to compile and load a system, see The System Browser.

  3. Create a Stepper tool by choosing Window > Tools > Stepper or pressing
  4. in the LispWorks toolbar.
  5. Enter this form in the Source area of the Stepper tool:
  6. (my-function 3)

  7. Choose the menu command Stepper > Step . The open parenthesis is highlighted orange, indicating that the next step is to evaluate the form.
  8. Choose Stepper > Step again. The symbol my-function is now highlighted orange, indicating that the next step is to call this function. Notice how the current stepping position is always highlighted orange.
  9. Notice how the topmost item in the Backtrace area always indicates the next step. Expand this item to show the arguments.
  10. Figure 24.2 Stepper backtrace showing the next step

  11. At this point we have the option to step my-function itself, but for the moment simply choose Stepper > Step again, which steps to the point where the function call returns. The Backtrace area shows the return value, 12, when you expand the status item.

Note how the Step command always steps only inside the current form, and does not step into other functions.


LispWorks IDE User Guide (Macintosh version) - 22 Dec 2009

NextPrevUpTopContentsIndex