[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

[UI8] UI8Steps

The Steps tool is a tool designed to trace execution of S8 Smalltalk expressions.
The tool execute an expression step by step and let the user inspect the objects of each method activated up to the point of execution.

The execution is realized using the S8 Scripting framework, so the execution is simulated; it is totally controlled by S8 environment and there is NO dependence on the execution engine (it is virtual machine independent and independent of the native language where your S8 objects are running).

On each step of execution, a message is sent (or atomic operation, in case of [step]).
A message sent activates a method for the receiver (show as "self"). We call "frame" to the context of execution (an activated method) while resolving a message sent.

The tool can be opened on any text selected in a workspace, pressing the steps button
Uploaded Image: steps.jpg

When the tool open, it shows a window with:
  1. Title
    1. the number of frames (between []) until the current point of execution
    2. a short description of the expression
    3. the HELP button (open this page)
  2. Toolbar
  3. List of frames (methods activated upto the current point in execution)
  4. List of objects visible in the execution context of selected frame
  5. Workspace pane
    1. show the code of selected frame (left pane) or workpsace representation of selected object (right pane)
  6. Workpsace toolbar
    1. [edit] button is used to enter a new expression (discarding current execution)
    2. [accept] button let you change the code of method (activated by the selected frame) and restart a new method activation
      In case an object is selected, the text is evaluated and the result is used to set the object bound to the selected binding
      Uploaded Image: UI8Steps.jpg

Note that the tool can be used connected to remote S8 systems, so the toolbars works on remote system.


Uploaded Image: toolbar.jpg
updateupdate the contents shown in all panes, preserving selections
nextadvance/execute up to the next message
stepOutexecute until exiting the selected frame
pausepause execution (if running animated steps).
Note that it has the same effect as the code contain a #halt message.
playstart animated steps, running until paused or execution complete
runexecute without showing frames until terminated or paused (with #halt)
restartrestart the execution of selected frame
runToHereexecute (without showing etails) until execution returns to the selected frame or the frame has been removed from frames
stepevaluate an atomic stpe of execution e.g. an asignment, an exit from method, activate a block, etc
resetrestart execution of the expression (discarding frames)
modesimple/expert - affects the description shown for selected object. In expert mode the object will be rendered as native object showing internal representation.
Note that the object attached to a name can be changed (with [accept]
unselectremove selection of current binding/frame
inspectinspect this tool
Most buttons acts as normal workspace buttons
browsebrowse the current selected frame/binding
messagesshow references of current frame

Stepping samples

Note in the following image, the presence of one frame to evaluate the expression "Point selectors sorted"
The receiver (self) is nil because the tool evaluate the expression as a block been evaluated on nil (anUndefinedObject)
Uploaded Image: UI8Steps1.jpg

Pressing [play] button the execution will run until [pause] button is pressed (or execution is completelly evaluated).
The frames list will show the activated frames ([6] frames in the image) until the point of execution.
The objects visible at current context of execution are shown in the list on the right.
Uploaded Image: UI8Steps2.jpg

At end of execution, the result of evaluating the expression is shown
Uploaded Image: UI8Steps3.jpg

Known bugs and Limitations (nov2020)

  1. The tool works 100% on S8 Smalltalk side, so in case of native methods and native operation the execution is routed to native side and the tool will step on return.