This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: Debugging
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
I pointed to a Python debugger post from Ted Leung this morning (here). In the comments, I was asked to post an image of a Smalltalk debugger in the middle of a sort. So, I slapped this code down in a workspace:
| items |
items := RSSFeedManager default getAllMyFeeds first items.
items asSortedCollection: [:a :b | a title <= b title].
Then I hit the "debug it" menu option, and got the following debugger:
Now, what does that stuff mean? Well, the top pane is the stack - the reason you see "UndefinedObject>>unboundMethod in there is that I executed the code out of a workspace - in other words, the code is not attached to any particular class. Incidentally, the VW Web Toolkit uses this feature to execute SSP code on a web page. Moving on, the code pane is below the context stack, and there's a toolbar at the top (with tooltips). Below the code pane are basic inspectors - for instance variables on the left, temps and method arguments on the right. Double clicking on any of them will yield a full inspector. You can move up and down the stack, inspecting things, executing code (possibly into new debuggers), and re-compile arbitrary methods - rewinding the stack to that point. Very cool stuff - and it's why you don't tend to see Smalltalkers getting excited about "modern" debuggers in other languages with (subsets) of this capability...