[squeak-dev] The Trunk: Help-Squeak-Project-kfr.16.mcz

karl ramberg karlramberg at gmail.com
Thu Jun 19 17:07:55 UTC 2014


Yes,
Please edit :-)

The text is basically copy paste of Ron Teitelbaums answer on debugging to
the mail list.
I thought it was worth saving and there was no info on the debugger in the
help browser.

Karl


On Thu, Jun 19, 2014 at 3:46 PM, David T. Lewis <lewis at mail.msen.com> wrote:

> Thanks for doing this Karl, it's good to have progress on documention.
>
> I figured that it was best to move it into trunk, and we can work on
> improving it from there. I might do a few edits myself if you don't mind.
> I think that the text may read more clearly if the explanation of loop
> debugging is moved to the bottom.
>
> Dave
>
> > Thanks, Dave.
> > This is a quite large package due to two screen shots that is part of
> this
> > documentation. The forms are in the postscript and are added to the
> > ScriptingSystem form dictionary.
> > This is not the ideal solution for adding media, but i found no better
> way
> > at the moment.
> >
> > Cheers,
> > Karl
> >
> >
> > On Thu, Jun 19, 2014 at 2:09 PM, <commits at source.squeak.org> wrote:
> >
> >> David T. Lewis uploaded a new version of Help-Squeak-Project to project
> >> The Trunk:
> >> http://source.squeak.org/trunk/Help-Squeak-Project-kfr.16.mcz
> >>
> >> ==================== Summary ====================
> >>
> >> Name: Help-Squeak-Project-kfr.16
> >> Author: kfr
> >> Time: 18 June 2014, 9:12:21.393 pm
> >> UUID: 7c27339a-1163-3846-b57d-e3b94c517bc8
> >> Ancestors: Help-Squeak-Project-kfr.15
> >>
> >> Debugger document
> >>
> >> =============== Diff against Help-Squeak-Project-kfr.10 ===============
> >>
> >> Item was added:
> >> + SqueakToolsHelp subclass: #SqueakToolsDebugger
> >> +       instanceVariableNames: ''
> >> +       classVariableNames: ''
> >> +       poolDictionaries: ''
> >> +       category: 'Help-Squeak-Project'!
> >>
> >> Item was added:
> >> + ----- Method: SqueakToolsDebugger class>>bookName (in category 'as yet
> >> unclassified') -----
> >> + bookName
> >> +       ^'Debugger'!
> >>
> >> Item was added:
> >> + ----- Method: SqueakToolsDebugger class>>debugger (in category 'as yet
> >> unclassified') -----
> >> + debugger
> >> +       ^HelpTopic
> >> +               title: 'Using the Debugger.'
> >> +               contents: ' Debugging Loops.
> >> + There are a few ways to get out of a loop.  The best way is to just
> >> let
> >> the loop run.
> >> + To do that select the space on your code (while in the Debugger) you
> >> want to jump to, right click and select: ''run to here.''
> >> +
> >> + ' asText,
> >> + (self showForm: #Debugger1),
> >> + '
> >> +
> >> + That will take you to the place you clicked on in your code.
> >> +
> >> + There is another trick, loops usually have an index.
> >> + This is Smalltalk after all.  In the case above
> >> + I just selected this code and selected ''Debug it''
> >> +
> >> + 1 to: 100 do: [:i | Transcript show: i asString].
> >> + Transcript show: ''done''
> >> +
> >> + While in the outer content evaluating the loop, select i change the
> >> value to 100 hit accept and ''bobs your uncle'' the loop is done.
> >> + Ok so a bit of a hack but I''ve used it to skip over some processing
> >> and
> >> since you are debugging and know what you are doing it should be fine.
> >> +
> >> + ' asText,
> >> + (self showForm: #Debugger2),
> >> + '
> >> + Proceed is just continue and stop debugging.
> >> +
> >> + Restart will stop debugging at the selected method and restart that
> >> method from the beginning.
> >> +
> >> + Into goes into the execution of the next method and shows you what it
> >> does
> >> +
> >> + Over executes the next message and moves over it to the next message
> >> +
> >> + Through steps you through a block of code, so if you are about to
> >> execute a block, this steps you through that block
> >> +
> >> + Full Stack increases the number of levels you see in the upper panel.
> >>  That normally shows you a subset of the execution stack.  Full stack
> >> will
> >> show you the rest of the stack that called this method.
> >> +
> >> + Where is useful if you click around a method during debugging.  It
> >> will
> >> highlight the code at its execution point.  You can also just select the
> >> stack method again to do the same thing.
> >> +
> >> + Tally well is supposed to Tally selected code.  Ignore Tally.  If you
> >> want to tally something do it outside a debugger.' asText!
> >>
> >> Item was added:
> >> + ----- Method: SqueakToolsDebugger class>>pages (in category 'as yet
> >> unclassified') -----
> >> + pages
> >> +       ^# (debugger)!
> >>
> >> Item was added:
> >> + ----- Method: SqueakToolsDebugger class>>showDebuggerMenuForm (in
> >> category 'as yet unclassified') -----
> >> + showDebuggerMenuForm
> >> +       | form contents |
> >> +       form := ScriptingSystem formAtKey: #Debugger1.
> >> +       contents :=  (String with: Character cr) asText,
> >> +                                       (Text string: ' '
> >> +                                       attribute: (TextFontReference
> >> toFont:
> >> +                                               (FormSetFont new
> >> +                                                       fromFormArray:
> >> (Array with: form)
> >> +                                                       asciiStart:
> >> Character space asInteger
> >> +                                                       ascent: form
> >> height))),
> >> +                                               (String with: Character
> >> cr) asText.
> >> +       ^contents!
> >>
> >> Item was added:
> >> + ----- Method: SqueakToolsDebugger class>>showForm: (in category 'as
> >> yet
> >> unclassified') -----
> >> + showForm: aSymbol
> >> +       | form contents |
> >> +       form := ScriptingSystem formAtKey: aSymbol.
> >> +       contents :=  (String with: Character cr) asText,
> >> +                                       (Text string: ' '
> >> +                                       attribute: (TextFontReference
> >> toFont:
> >> +                                               (FormSetFont new
> >> +                                                       fromFormArray:
> >> (Array with: form)
> >> +                                                       asciiStart:
> >> Character space asInteger
> >> +                                                       ascent: form
> >> height))),
> >> +                                               (String with: Character
> >> cr) asText.
> >> +       ^contents!
> >>
> >> Item was added:
> >> + (PackageInfo named: 'Help-Squeak-Project') postscript: '| aForm
> >> aSecondForm |
> >> (excessive size, no diff calculated)
> >>
> >>
> >>
> >
> >
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140619/22ad9f53/attachment.htm


More information about the Squeak-dev mailing list