<HTML>
<HEAD>
<TITLE>Re: can current line be changed in debugger?</TITLE>
</HEAD>
<BODY>
<FONT COLOR="#FF00FF"><FONT FACE="Verdana">Rob Whitfield write:<BR>
Is there a way to change the current line of execution within the <BR>
debugger? &nbsp;For example, can I jump back a few lines to re-execute a section <BR>
of code?<BR>
</FONT></FONT><FONT FACE="Verdana">You can restart from the same method or from some method previous to the current.<BR>
I suggest you can have a button &#8220;DEBUG&#8221; and one method debug where you can arbitrary set values and redirect the secuence of steps anywhere in your program.<BR>
<BR>
debug _ SimpleButtonMorph new label: 'DEBUG';<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;target: self;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;actionSelector: #debug;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position: 650 @ 450.<BR>
&nbsp;&nbsp;&nbsp;&nbsp;self addMorphBack: carta.<BR>
<BR>
<BR>
&nbsp;debug<BR>
variable1 := valueWhatIChoose1. &#8220;set others variables same &#8220;<BR>
self anotherMethod<BR>
<BR>
Of course is valid if you have a front morph, but I suppose if you do Squeak , do morphic too.<BR>
Edgar<BR>
</FONT>
</BODY>
</HTML>