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