Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Proposal: Better Debugging (2006)
Last updated at 10:12 am UTC on 10 October 2019

Improving Debugging in Smalltalk

Ashley George Taylor
CS8503 Fall '98, Prof. Guzdial


In an earlier study [TayGuz97], we found that students find the Smalltalk Debugger difficult to understand and use because:

The debugger does not support the formation of a mental model of execution of an OOL for novices. We propose to design a debugger which makes the Smalltalk execution model explicit and visual.

The main aspects of the Smalltalk execution model are:


We propose a Smalltalk tracing tool/debugger for novices which uses some aspects of the existing debugger, but has the following features:



However, there is a display space problem which could be addressed by panning or sideways scrolling, or window tiling. I propose to develop and test a prototype of this debugger next quarter.

Ideas were drawn from [Ward86], and Javation by IBM (can?t find a reference so far - saw it at a talk last year)

Testing
Essentially, testing is methodical checking to try to determine if code works correctly, actively looking for bugs rather than passively running into and reacting to them.

A simple scheme which students could use is testing each class they write as a unit. However. Some classes depend on each other, so a dependency order should be established, and classes should be tested from the bottom of the dependency tree upwards. There are cases where a class needs to be tested before one of its dependent classes is written. In this case a stub class can be written which implements dummy versions of the required methods. In cases where classes are co-dependent, a stub class will also be needed.

A test plan should be written for each class which, at a minimum, sends messages with inputs just in and outside the permitted range. This could be saved as a class method. A testing tool or debugger can be used with a test method to examine values in a more orderly fashion.

Related to debugging, Bob Arning has created the SyntaxMorph tool, which includes a graphical view of the Smalltalk syntax. This includes the text pane of the debugger, and it is possible to check the values of variables directly in the source code by passing the mouse over them. See BobArning's page for details.

Scamper

See also

ObjectTracer