run line of code instead of running the complete code

2,235 views
Skip to first unread message

Silva

unread,
Mar 30, 2012, 11:10:33 AM3/30/12
to PyScripter
Hi!
I just started using PyScripter and I was looking for a feature but I
can't find it. Is it possible to run a line of code instead of the
full code ?

How can I send a line or a selection of lines of code, instead of
running the complete code ?


Thanks

Colin J. Williams

unread,
Mar 30, 2012, 1:19:07 PM3/30/12
to pyscr...@googlegroups.com
Yes.  There is a Step Function (F8) and a Step Into Function (F7), for stepping through a function.  Both of these should be available on the Tool Bar - see the PyScripter Help for more information.

The usual approach is to set a Breakpoint at the line you wish to examine (click on the line number, to the left of the code), then press F9.  Execution will stop at your line of code (or before, if there is an execption).  Then press F7 to execute the line of interest.

I hope that this helps.

Good luck,

Colin W.


PyScripter

unread,
Mar 30, 2012, 1:37:39 PM3/30/12
to pyscr...@googlegroups.com
The question is a bit unclear, but in case you did not know you can execute some lines of code in a couple of ways:

a) Select the code in the editor, right-click and select Source Code, Execute Selection (Ctrl+F7)
or
b) Copy the lines to the clipboard and in the interpreter right-click and select Paste & Execute.

The difference between the two approaches is that the second way preserves the lines in the interpreter history of commands.
Reply all
Reply to author
Forward
0 new messages