Breakpoints and Variables?

1,085 views
Skip to first unread message

Jay Shaffstall

unread,
Nov 28, 2016, 12:51:28 AM11/28/16
to thonny
I just discovered Thonny, when looking for a replacement for the Calico IDE for my Intro to Computer Science classes.  So far it looks like Thonny is going to be a great option for us!

One feature that I couldn't find, though, was the ability to set a breakpoint and have the program run until it hit that line.  Given the toolbar buttons don't include any sort of general resume when you're debugging, I'm assuming that breakpoints don't exist.  It'd be great to have both breakpoints and the ability to resume the program.  

The variables tab can also get a bit busy when importing modules (especially with the "from module import *" syntax).  Is there any way to limit it to just variables from the current module?

Aivar Annamaa

unread,
Nov 28, 2016, 1:13:41 AM11/28/16
to thonny
Hi Jay!

I'm glad you're considering Thonny for your classes!

About breakpoints -- I wanted to do away without them in order to keep the debugging model simpler, but they may appear in a future release. But did you try "Run to cursor" from "Run" menu? Maybe this can be used instead of breakpoints?

About variables -- I found the problem you described to be great opportunity for explaning why it's useful to avoid star-imports. But your message made me consider showing imported names in the end of the table or with different color or something like this.

In general, my main focus has been to visualize Python's "notional machine" as clearly as possible. Seems that in some cases this is in conflict with efficient use of the IDE. I don't worry myself too much about it because I expect my students to move on to a more powerful IDE once they understand the principles of procedural programming.

best regards,
Aivar

Aivar Annamaa

unread,
Nov 28, 2016, 1:16:20 AM11/28/16
to thonny
I forgot to suggest that maybe you can use "Step out" instead of "Resume"?

Aivar

Jay Shaffstall

unread,
Nov 28, 2016, 8:32:18 AM11/28/16
to thonny
Showing imported symbols at the end of the variable list would be a big help, showing the ones they're probably interested in at the top, but keeping the transparency to what Python's actually doing.

I had missed Run to cursor, that's good enough for the intro class we'll be using Thonny in.  Thanks!

Jay

illyrian...@gmail.com

unread,
Dec 11, 2016, 2:41:28 AM12/11/16
to thonny
Hi,
I am also considering using Thonny to introduce my students to coding in Python.  I wanted a simple interface and a simple debugger so that students can trace through their code (this is now mandated in the tech curriculum).
The inclusion of breakpoints would be very useful, just so that students can understand what they do and to provide greater flexibility.  I understand they can use the 'run to cursor' option, but breakpoints would be a great addition.
Thanks
Kate

Aivar Annamaa

unread,
Dec 11, 2016, 3:14:37 AM12/11/16
to thonny
Hi Kate (and Jay)!

Looks like I can't ignore breakpoints issue anymore (although I'm not missing them myself :) ).


If you have Bitbucket account (or are willing to create one) then I'd prefer to move the discussion there.

best regards
Aivar
Reply all
Reply to author
Forward
0 new messages