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